Ignore:
Timestamp:
Dec 31, 2008, 11:18:08 AM (16 years ago)
Author:
rosiere
Message:

1) Fix bug (read unit, RAT -> write in R0, SPR desallocation ...)
2) Change VHDL Execute_queue -> use Generic/Queue?
3) Complete document on VHDL generation
4) Add soc test

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop
Files:
15 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

    r88 r98  
    226226    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
    227227
     228    log_printf(TRACE,Functionnal_unit,FUNCTION,"  * data_rc     : %d",op->_data_rc);
     229    log_printf(TRACE,Functionnal_unit,FUNCTION,"  * f_in        : %d",f_in);
     230
    228231    // Result
    229232    op->_timing       = param->_timing[op->_type][op->_operation];
     
    233236    op->_no_sequence  = f_in == 0;
    234237    op->_address      = imm;
     238
     239    log_printf(TRACE,Functionnal_unit,FUNCTION,"  * no_sequence : %d",op->_no_sequence);
    235240  };
    236241
     
    664669
    665670    spr_address_t   spr_addr   = reg->_spr_access_mode->translate_address(addr);
    666    
     671
    667672    // Test if this group is implemented in this functionnal_unit
    668673    if (reg->_spr_access_mode->valid(spr_addr))
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp

    r97 r98  
    8787            _execute_operation_in->_write_rd      = PORT_READ(in_EXECUTE_IN_WRITE_RD    );
    8888            _execute_operation_in->_num_reg_rd    = PORT_READ(in_EXECUTE_IN_NUM_REG_RD  );
     89            _execute_operation_in->_data_rd       = 0; // no necessaray
    8990            _execute_operation_in->_write_re      = PORT_READ(in_EXECUTE_IN_WRITE_RE    );
    9091            _execute_operation_in->_num_reg_re    = PORT_READ(in_EXECUTE_IN_NUM_REG_RE  );
     92            _execute_operation_in->_data_re       = 0; // no necessaray
    9193
    9294            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * context_id    : %d",_execute_operation_in->_context_id   );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/src/test.cpp

    r88 r98  
    370370      for (uint32_t j=0; j<_param->_nb_ooo_engine; j++)
    371371        {
    372           for (uint32_t i=0; i<_param->_nb_general_register; i++)
     372          _gpr_val [0][j] = 0;
     373          _gpr     [0][j] = 0;
     374          _spr_val [0][j] = 0;
     375          _spr     [0][j] = 0;
     376
     377          for (uint32_t i=1; i<_param->_nb_general_register; i++)
    373378            {
    374379              _gpr_val      [i][j] = ((rand()%100) < percent_registerfile_valid);
    375380              _gpr          [i][j] = rand()%(1<<_param->_size_general_data);
    376381            }
    377           for (uint32_t i=0; i<_param->_nb_special_register; i++)
     382          for (uint32_t i=1; i<_param->_nb_special_register; i++)
    378383            {
    379384              _spr_val      [i][j] = ((rand()%100) < percent_registerfile_valid);
     
    381386            }
    382387        }
     388
     389
    383390      // End initialisation .......
    384391     
     
    466473              Tcontext_t         ooo_engine = rand()% _param->_nb_ooo_engine;
    467474              Tgeneral_address_t num_reg = rand()% _param->_nb_general_register;
    468               Tgeneral_data_t    data    = rand()%(1<<_param->_size_general_data);
     475              Tgeneral_data_t    data    = (num_reg!=0)?(rand()%(1<<_param->_size_general_data)):0;
    469476             
    470477              GPR_WRITE_VAL           [i]->write(val);       
     
    534541//            TEST(Tcontrol_t        ,READ_QUEUE_OUT_READ_RA    ->read(),_read_ra      [rob_id]);
    535542              TEST(Tgeneral_address_t,READ_QUEUE_OUT_NUM_REG_RA ->read(),_num_reg_ra   [rob_id]);
    536               TEST(Tcontrol_t        ,READ_QUEUE_OUT_DATA_RA_VAL->read(),not _read_ra [rob_id] or _gpr_val [_num_reg_ra[rob_id]][ctxt]);
     543              TEST(Tcontrol_t        ,READ_QUEUE_OUT_DATA_RA_VAL->read(),not _read_ra [rob_id] or _gpr_val [_num_reg_ra[rob_id]][ctxt] or (_num_reg_ra[rob_id] == 0));
    537544              if (_read_ra [rob_id] and
    538545                  READ_QUEUE_OUT_DATA_RA_VAL->read())
     
    540547//            TEST(Tcontrol_t        ,READ_QUEUE_OUT_READ_RB    ->read(),_read_rb      [rob_id]);
    541548              TEST(Tgeneral_address_t,READ_QUEUE_OUT_NUM_REG_RB ->read(),_num_reg_rb   [rob_id]);
    542               TEST(Tcontrol_t        ,READ_QUEUE_OUT_DATA_RB_VAL->read(),not _read_rb [rob_id] or _gpr_val [_num_reg_rb[rob_id]][ctxt]);
     549              TEST(Tcontrol_t        ,READ_QUEUE_OUT_DATA_RB_VAL->read(),not _read_rb [rob_id] or _gpr_val [_num_reg_rb[rob_id]][ctxt] or (_num_reg_rb[rob_id] == 0));
    543550              if (_read_rb [rob_id] and
    544551                  READ_QUEUE_OUT_DATA_RB_VAL->read())
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Types.h

    r82 r98  
    110110      log_printf(FUNC,Read_queue,FUNCTION,"Begin");
    111111         
    112       _context_id   = x._context_id   ;
    113       _front_end_id = x._front_end_id ;
    114       _ooo_engine_id= x._ooo_engine_id;
    115       _rob_id       = x._rob_id       ;
    116       _operation    = x._operation    ;
    117       _type         = x._type         ;
     112      _context_id            = x._context_id   ;
     113      _front_end_id          = x._front_end_id ;
     114      _ooo_engine_id         = x._ooo_engine_id;
     115      _rob_id                = x._rob_id       ;
     116      _operation             = x._operation    ;
     117      _type                  = x._type         ;
    118118      _store_queue_ptr_write = x._store_queue_ptr_write;
    119119      _load_queue_ptr_write  = x._load_queue_ptr_write ;
    120       _has_immediat = x._has_immediat ;
    121       _immediat     = x._immediat     ;
    122       _read_ra      = x._read_ra      ;
    123       _read_ra_val  = x._read_ra == 1 ; //if not must read, the registerFile is already access
    124       _num_reg_ra   = x._num_reg_ra   ;
    125       _data_ra_val  = x._read_ra == 0 ; //if not must read, the data is already valid
    126       _data_ra      = 0               ;
    127       _read_rb      = x._read_rb      ;
    128       _read_rb_val  = x._read_rb == 1 ;
    129       _num_reg_rb   = x._num_reg_rb   ;
    130       _data_rb_val  = x._read_rb == 0 ;
    131       _data_rb      = 0               ;
    132       _read_rc      = x._read_rc      ;
    133       _read_rc_val  = x._read_rc == 1 ;
    134       _num_reg_rc   = x._num_reg_rc   ;
    135       _data_rc_val  = x._read_rc == 0 ;
    136       _data_rc      = 0               ;
    137       _write_rd     = x._write_rd     ;
    138       _num_reg_rd   = x._num_reg_rd   ;
    139       _write_re     = x._write_re     ;
    140       _num_reg_re   = x._num_reg_re   ;
     120      _has_immediat          = x._has_immediat ;
     121      _immediat              = x._immediat     ;
     122      _read_ra               = x._read_ra      ;
     123      _read_ra_val           = x._read_ra == 1 ; //if not must read, the registerFile is already access
     124      _num_reg_ra            = x._num_reg_ra   ;
     125      _data_ra_val           = ((x._read_ra == 0) or (x._num_reg_ra == 0)); //if not must read, the data is already valid
     126      _data_ra               = 0               ;
     127      _read_rb               = x._read_rb      ;
     128      _read_rb_val           = x._read_rb == 1 ;
     129      _num_reg_rb            = x._num_reg_rb   ;
     130      _data_rb_val           = ((x._read_rb == 0) or (x._num_reg_rb == 0));
     131      _data_rb               = 0               ;
     132      _read_rc               = x._read_rc      ;
     133      _read_rc_val           = x._read_rc == 1 ;
     134      _num_reg_rc            = x._num_reg_rc   ;
     135      _data_rc_val           = x._read_rc == 0 ;
     136      _data_rc               = 0               ;
     137      _write_rd              = x._write_rd     ;
     138      _num_reg_rd            = x._num_reg_rd   ;
     139      _write_re              = x._write_re     ;
     140      _num_reg_re            = x._num_reg_re   ;
    141141
    142142      log_printf(FUNC,Read_queue,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp

    r97 r98  
    146146        if (_queue->size()>0)
    147147          {
    148 //   protected : Tread_queue_head_entry_t       * _queue_head;
    149 //   protected : std::queue<Tread_queue_entry_t *>   * _queue;
    150            
    151148            log_printf(TRACE,Read_queue,FUNCTION,"    * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.1d %.1d %.4d %.1d %.8x, %.1d %.1d %.4d %.1d %.8x, %.1d %.1d %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)",
    152149                       0,
     
    246243          }
    247244#endif
    248 
    249 
    250245      }
    251246
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl.cpp

    r81 r98  
    2626   
    2727    //----- Queue -----
    28     
     28   
    2929    morpheo::behavioural::generic::queue::Parameters * param_queue;
    3030    morpheo::behavioural::generic::queue::Queue      * queue;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl_body.cpp

    r97 r98  
    176176    vhdl->set_body(0,"out_READ_QUEUE_OUT_HAS_IMMEDIAT  <= internal_HAS_IMMEDIAT ;");
    177177    vhdl->set_body(0,"out_READ_QUEUE_OUT_IMMEDIAT      <= internal_IMMEDIAT     ;");
    178 //     vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RA       <= internal_READ_RA      ;");
     178//  vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RA       <= internal_READ_RA      ;");
    179179    vhdl->set_body(0,"out_READ_QUEUE_OUT_NUM_REG_RA    <= internal_NUM_REG_RA   ;");
    180180    vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RA_VAL   <= internal_NEXT_DATA_RA_VAL;");
    181181    vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RA       <= internal_NEXT_DATA_RA ;");
    182 //     vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RB       <= internal_READ_RB      ;");
     182//  vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RB       <= internal_READ_RB      ;");
    183183    vhdl->set_body(0,"out_READ_QUEUE_OUT_NUM_REG_RB    <= internal_NUM_REG_RB   ;");
    184184    vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RB_VAL   <= internal_NEXT_DATA_RB_VAL;");
    185185    vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RB       <= internal_NEXT_DATA_RB ;");
    186 //     vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RC       <= internal_READ_RC      ;");
     186//  vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RC       <= internal_READ_RC      ;");
    187187    vhdl->set_body(0,"out_READ_QUEUE_OUT_NUM_REG_RC    <= internal_NUM_REG_RC   ;");
    188188    vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RC_VAL   <= internal_NEXT_DATA_RC_VAL;");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_transition.cpp

    r97 r98  
    2525      log_printf(TRACE,Reservation_station,FUNCTION,"  * Dump Reservation Station");  \
    2626      for (uint32_t it_dump=0;it_dump<_param->_size_queue; it_dump++)   \
    27         log_printf(TRACE,Reservation_station,FUNCTION,"    * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)", \
    28                    it_dump,                                             \
    29                    _queue[it_dump]._context_id           ,              \
    30                    _queue[it_dump]._front_end_id         ,              \
    31                    _queue[it_dump]._ooo_engine_id        ,              \
    32                    _queue[it_dump]._rob_id               ,              \
    33                    _queue[it_dump]._type                 ,              \
    34                    _queue[it_dump]._operation            ,              \
    35                    _queue[it_dump]._store_queue_ptr_write,              \
    36                    _queue[it_dump]._load_queue_ptr_write ,              \
    37                    _queue[it_dump]._has_immediat         ,              \
    38                    _queue[it_dump]._immediat             ,              \
    39                    _queue[it_dump]._num_reg_ra           ,              \
    40                    _queue[it_dump]._data_ra_val          ,              \
    41                    _queue[it_dump]._data_ra              ,              \
    42                    _queue[it_dump]._num_reg_rb           ,              \
    43                    _queue[it_dump]._data_rb_val          ,              \
    44                    _queue[it_dump]._data_rb              ,              \
    45                    _queue[it_dump]._num_reg_rc           ,              \
    46                    _queue[it_dump]._data_rc_val          ,              \
    47                    _queue[it_dump]._data_rc              ,              \
    48                    _queue[it_dump]._write_rd             ,              \
    49                    _queue[it_dump]._num_reg_rd           ,              \
    50                    _queue[it_dump]._write_re             ,              \
    51                    _queue[it_dump]._num_reg_re           ,              \
    52                    toString(_queue[it_dump]._type).c_str());       \
     27        if (_queue_valid [it_dump])                                     \
     28          log_printf(TRACE,Reservation_station,FUNCTION,"    * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)", \
     29                     it_dump,                                           \
     30                     _queue[it_dump]._context_id           ,            \
     31                     _queue[it_dump]._front_end_id         ,            \
     32                     _queue[it_dump]._ooo_engine_id        ,            \
     33                     _queue[it_dump]._rob_id               ,            \
     34                     _queue[it_dump]._type                 ,            \
     35                     _queue[it_dump]._operation            ,            \
     36                     _queue[it_dump]._store_queue_ptr_write,            \
     37                     _queue[it_dump]._load_queue_ptr_write ,            \
     38                     _queue[it_dump]._has_immediat         ,            \
     39                     _queue[it_dump]._immediat             ,            \
     40                     _queue[it_dump]._num_reg_ra           ,            \
     41                     _queue[it_dump]._data_ra_val          ,            \
     42                     _queue[it_dump]._data_ra              ,            \
     43                     _queue[it_dump]._num_reg_rb           ,            \
     44                     _queue[it_dump]._data_rb_val          ,            \
     45                     _queue[it_dump]._data_rb              ,            \
     46                     _queue[it_dump]._num_reg_rc           ,            \
     47                     _queue[it_dump]._data_rc_val          ,            \
     48                     _queue[it_dump]._data_rc              ,            \
     49                     _queue[it_dump]._write_rd             ,            \
     50                     _queue[it_dump]._num_reg_rd           ,            \
     51                     _queue[it_dump]._write_re             ,            \
     52                     _queue[it_dump]._num_reg_re           ,            \
     53                     toString(_queue[it_dump]._type).c_str());          \
    5354    } while (0)
    5455#else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/Makefile.deps

    r81 r98  
    1313include                         $(DIR_MORPHEO)/Behavioural/Makefile.deps
    1414endif
     15ifndef Queue
     16include                         $(DIR_MORPHEO)/Behavioural/Generic/Queue/Makefile.deps
     17endif
    1518
    1619#-----[ Directory ]----------------------------------------
     
    2023#-----[ Library ]------------------------------------------
    2124Execute_queue_LIBRARY           =       -lExecute_queue \
     25                                        $(Queue_LIBRARY)        \
    2226                                        $(Behavioural_LIBRARY) 
    2327
    2428Execute_queue_DIR_LIBRARY       =       -L$(Execute_queue_DIR)/lib      \
     29                                        $(Queue_DIR_LIBRARY) \
    2530                                        $(Behavioural_DIR_LIBRARY)
    2631
     
    3035                                @\
    3136                                $(MAKE) Behavioural_library; \
     37                                $(MAKE) Queue_library; \
    3238                                $(MAKE) --directory=$(Execute_queue_DIR) --makefile=Makefile;
    3339
     
    3541                                @\
    3642                                $(MAKE) Behavioural_library_clean; \
     43                                $(MAKE) Queue_library_clean; \
    3744                                $(MAKE) --directory=$(Execute_queue_DIR) --makefile=Makefile clean;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/test.cpp

    r97 r98  
    77 */
    88
    9 #define NB_ITERATION  1
     9#define NB_ITERATION  16
    1010#define CYCLE_MAX     (128*NB_ITERATION)
    1111
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h

    r88 r98  
    3838//public : uint32_t            _size_ooo_engine_id           ;
    3939//public : uint32_t            _size_packet_id               ;
     40  public : uint32_t            _size_internal_queue          ;
    4041
    4142//public : bool                _have_port_context_id         ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl.cpp

    r81 r98  
    99#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h"
    1010#include "Behavioural/include/Vhdl.h"
     11#include "Behavioural/Generic/Queue/include/Queue.h"
    1112
    1213namespace morpheo                    {
     
    2526  {
    2627    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
     28
     29    //----- Queue -----
     30   
     31    morpheo::behavioural::generic::queue::Parameters * param_queue;
     32    morpheo::behavioural::generic::queue::Queue      * queue;
     33   
     34    param_queue = new morpheo::behavioural::generic::queue::Parameters
     35      (_param->_size_queue,
     36       _param->_size_internal_queue
     37       );
     38   
     39    std::string queue_name = _name + "_queue";
     40    queue = new morpheo::behavioural::generic::queue::Queue
     41      (queue_name.c_str()
     42#ifdef STATISTICS
     43       ,NULL
     44#endif
     45       ,param_queue
     46       ,USE_VHDL);
     47   
     48    _component->set_component(queue->_component
     49#ifdef POSITION
     50                              , 0, 0, 0, 0
     51#endif
     52                              , INSTANCE_LIBRARY
     53                              );
    2754
    2855    Vhdl * vhdl = new Vhdl (_name);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_body.cpp

    r96 r98  
    2424  {
    2525    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
    26     vhdl->set_body (0,"");
    27     vhdl->set_body (0,"process (in_CLOCK)");
    28     vhdl->set_body (0,"begin");
    29     vhdl->set_body (1,"if in_CLOCK'event and in_CLOCK = '1' then");
    30 //     vhdl->set_body (2,"if in_NRESET = '0' then");
    31 //     vhdl->set_body (3,"reg_CURRENT_STATE <= STATE_0;");
    32 //     vhdl->set_body (2,"else");
    33     vhdl->set_body (3,"reg_CURRENT_STATE <= sig_NEXT_STATE;");
     26
     27    vhdl->set_comment(0,"");
     28    vhdl->set_comment(0,"-----------------------------------");
     29    vhdl->set_comment(0,"-- Instance queue                  ");
     30    vhdl->set_comment(0,"-----------------------------------");
     31    vhdl->set_comment(0,"");
     32
     33    vhdl->set_body   (0,"instance_"+_name+"_queue : "+_name+"_queue");
     34    vhdl->set_body   (0,"port map (");
     35    vhdl->set_body   (1,"  in_CLOCK       \t=>\t      in_CLOCK ");
     36    vhdl->set_body   (1,", in_NRESET      \t=>\t      in_NRESET");
     37    vhdl->set_body   (1,", in_INSERT_VAL  \t=>\tinternal_QUEUE_INSERT_VAL");
     38    vhdl->set_body   (1,",out_INSERT_ACK  \t=>\tinternal_QUEUE_INSERT_ACK");
     39    vhdl->set_body   (1,", in_INSERT_DATA \t=>\tinternal_QUEUE_INSERT_DATA");
     40    vhdl->set_body   (1,",out_RETIRE_VAL  \t=>\tinternal_QUEUE_RETIRE_VAL");
     41    vhdl->set_body   (1,", in_RETIRE_ACK  \t=>\tinternal_QUEUE_RETIRE_ACK");
     42    vhdl->set_body   (1,",out_RETIRE_DATA \t=>\tinternal_QUEUE_RETIRE_DATA");
     43    vhdl->set_body   (0,");");
     44
     45    vhdl->set_comment(0,"");
     46    vhdl->set_comment(0,"-----------------------------------");
     47    vhdl->set_comment(0,"-- Input  Buffer                   ");
     48    vhdl->set_comment(0,"-----------------------------------");
     49    vhdl->set_comment(0,"");
     50
     51    {
     52    uint32_t min = 0;
     53    uint32_t max, size;
     54
     55    if(_param->_have_port_context_id   )
     56      {
     57    size = _param->_size_context_id;
     58    max = min-1+size;
     59    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
     60    min = max+1;
     61      }
     62    if(_param->_have_port_front_end_id   )
     63      {
     64    size = _param->_size_front_end_id;
     65    max = min-1+size;
     66    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
     67    min = max+1;
     68      }
     69    if(_param->_have_port_ooo_engine_id   )
     70      {
     71    size = _param->_size_ooo_engine_id;
     72    max = min-1+size;
     73    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
     74    min = max+1;
     75      }
     76    if(_param->_have_port_rob_ptr)
     77      {
     78    size = _param->_size_rob_ptr;
     79    max = min-1+size;
     80    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
     81    min = max+1;
     82      }
     83
     84//  size = _param->_size_operation;
     85//  max = min-1+size;
     86//  vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OPERATION;");
     87//  min = max+1;
     88//
     89//  size = _param->_size_type;
     90//  max = min-1+size;
     91//  vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_TYPE;");
     92//  min = max+1;
     93
     94    size = _param->_size_special_data;
     95    max = min-1+size;
     96    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FLAGS;");
     97    min = max+1;
     98
     99    size = _param->_size_exception;   
     100    max = min-1+size;
     101    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
     102    min = max+1;
     103
     104    size = 1;
     105    max = min-1+size;
     106    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
     107    min = max+1;
     108
     109    size = _param->_size_instruction_address;
     110    max = min-1+size;
     111    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_ADDRESS;");
     112    min = max+1;
     113
     114    size = _param->_size_general_data;
     115    max = min-1+size;
     116    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_DATA;");
     117    min = max+1;
     118    }
     119
     120    vhdl->set_comment(0,"");
     121    vhdl->set_comment(0,"-----------------------------------");
     122    vhdl->set_comment(0,"-- Output Buffer                   ");
     123    vhdl->set_comment(0,"-----------------------------------");
     124    vhdl->set_comment(0,"");
     125
     126    if(_param->_have_port_context_id)
     127    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID    <= internal_EXECUTE_QUEUE_OUT_CONTEXT_ID   ;");
     128    if(_param->_have_port_front_end_id)
     129    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID  <= internal_EXECUTE_QUEUE_OUT_FRONT_END_ID ;");
     130    if(_param->_have_port_ooo_engine_id)
     131    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID;");
     132    if(_param->_have_port_rob_ptr)
     133    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID     <= internal_EXECUTE_QUEUE_OUT_PACKET_ID    ;");
     134//  vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_OPERATION     <= internal_EXECUTE_QUEUE_OUT_OPERATION    ;");
     135//  vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_TYPE          <= internal_EXECUTE_QUEUE_OUT_TYPE         ;");
     136    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_FLAGS         <= internal_EXECUTE_QUEUE_OUT_FLAGS        ;");
     137    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_EXCEPTION     <= internal_EXECUTE_QUEUE_OUT_EXCEPTION    ;");
     138    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE   <= internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ;");
     139    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_ADDRESS       <= internal_EXECUTE_QUEUE_OUT_ADDRESS      ;");
     140    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_DATA          <= internal_EXECUTE_QUEUE_OUT_DATA         ;");
     141
     142
     143//     vhdl->set_body (0,"");
     144//     vhdl->set_body (0,"process (in_CLOCK)");
     145//     vhdl->set_body (0,"begin");
     146//     vhdl->set_body (1,"if in_CLOCK'event and in_CLOCK = '1' then");
     147// //     vhdl->set_body (2,"if in_NRESET = '0' then");
     148// //     vhdl->set_body (3,"reg_CURRENT_STATE <= STATE_0;");
     149// //     vhdl->set_body (2,"else");
     150//     vhdl->set_body (3,"reg_CURRENT_STATE <= sig_NEXT_STATE;");
     151// //     vhdl->set_body (2,"end if;");
     152
     153//     for (uint32_t i = 0; i <_param->_size_queue - 1; i++)
     154//       {
     155//      vhdl->set_body (2,"if sig_WEN_"+toString(i)+" = '1' then");
     156//      vhdl->set_body (3,"if sig_SEL_"+toString(i)+" = '0' then");
     157//      if (_param->_have_port_context_id)
     158//      vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+"    <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
     159//      if (_param->_have_port_front_end_id)
     160//      vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+"  <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
     161//      if (_param->_have_port_ooo_engine_id)
     162//      vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
     163//      if (_param->_have_port_rob_ptr)
     164//         vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+"     <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
     165//      vhdl->set_body (4, "reg_FLAGS_"+toString(i)+"        <= in_EXECUTE_QUEUE_IN_FLAGS;");
     166//      vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+"    <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
     167//      vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+"  <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
     168//      vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+"      <= in_EXECUTE_QUEUE_IN_ADDRESS;");
     169//      vhdl->set_body (4, "reg_DATA_"+toString(i)+"         <= in_EXECUTE_QUEUE_IN_DATA;");
     170
     171//      vhdl->set_body (3, "else");
     172//      if (_param->_have_port_context_id)
     173//      vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+"    <= reg_CONTEXT_ID_"+toString(i+1)+";");
     174//      if (_param->_have_port_front_end_id)
     175//      vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+"  <= reg_FRONT_END_ID_"+toString(i+1)+";");
     176//      if (_param->_have_port_ooo_engine_id)
     177//      vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= reg_OOO_ENGINE_ID_"+toString(i+1)+";");
     178//      if (_param->_have_port_rob_ptr)
     179//         vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+"     <= reg_PACKET_ID_"+toString(i+1)+";");
     180//      vhdl->set_body (4, "reg_FLAGS_"+toString(i)+"        <= reg_FLAGS_"+toString(i+1)+";");
     181//      vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+"    <= reg_EXCEPTION_"+toString(i+1)+";");
     182//      vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+"  <= reg_NO_SEQUENCE_"+toString(i+1)+";");
     183//      vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+"      <= reg_ADDRESS_"+toString(i+1)+";");
     184//      vhdl->set_body (4, "reg_DATA_"+toString(i)+"         <= reg_DATA_"+toString(i+1)+";");
     185       
     186//      vhdl->set_body (3,"end if;");
     187
     188//      vhdl->set_body (2,"end if;");
     189//       }
     190
     191//     vhdl->set_body (2,"if sig_WEN_"+toString(_param->_size_queue-1)+" = '1' then");
     192//     if (_param->_have_port_context_id)
     193//       vhdl->set_body (3,"reg_CONTEXT_ID_"+toString(_param->_size_queue-1)+"    <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
     194//     if (_param->_have_port_front_end_id)
     195//       vhdl->set_body (3,"reg_FRONT_END_ID_"+toString(_param->_size_queue-1)+"  <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
     196//     if (_param->_have_port_ooo_engine_id)
     197//       vhdl->set_body (3,"reg_OOO_ENGINE_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
     198//     if (_param->_have_port_rob_ptr)
     199//       vhdl->set_body (3,"reg_PACKET_ID_"+toString(_param->_size_queue-1)+"     <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
     200//     vhdl->set_body (3, "reg_FLAGS_"+toString(_param->_size_queue-1)+"        <= in_EXECUTE_QUEUE_IN_FLAGS;");
     201//     vhdl->set_body (3, "reg_EXCEPTION_"+toString(_param->_size_queue-1)+"    <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
     202//     vhdl->set_body (3, "reg_NO_SEQUENCE_"+toString(_param->_size_queue-1)+"  <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
     203//     vhdl->set_body (3, "reg_ADDRESS_"+toString(_param->_size_queue-1)+"      <= in_EXECUTE_QUEUE_IN_ADDRESS;");
     204//     vhdl->set_body (3, "reg_DATA_"+toString(_param->_size_queue-1)+"         <= in_EXECUTE_QUEUE_IN_DATA;");
    34205//     vhdl->set_body (2,"end if;");
    35206
    36     for (uint32_t i = 0; i <_param->_size_queue - 1; i++)
    37       {
    38         vhdl->set_body (2,"if sig_WEN_"+toString(i)+" = '1' then");
    39         vhdl->set_body (3,"if sig_SEL_"+toString(i)+" = '0' then");
    40         if (_param->_have_port_context_id)
    41         vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+"    <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
    42         if (_param->_have_port_front_end_id)
    43         vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+"  <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
    44         if (_param->_have_port_ooo_engine_id)
    45         vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
    46         if (_param->_have_port_rob_ptr)
    47         vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+"     <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
    48         vhdl->set_body (4, "reg_FLAGS_"+toString(i)+"        <= in_EXECUTE_QUEUE_IN_FLAGS;");
    49         vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+"    <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
    50         vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+"  <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
    51         vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+"      <= in_EXECUTE_QUEUE_IN_ADDRESS;");
    52         vhdl->set_body (4, "reg_DATA_"+toString(i)+"         <= in_EXECUTE_QUEUE_IN_DATA;");
    53 
    54         vhdl->set_body (3, "else");
    55         if (_param->_have_port_context_id)
    56         vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+"    <= reg_CONTEXT_ID_"+toString(i+1)+";");
    57         if (_param->_have_port_front_end_id)
    58         vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+"  <= reg_FRONT_END_ID_"+toString(i+1)+";");
    59         if (_param->_have_port_ooo_engine_id)
    60         vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= reg_OOO_ENGINE_ID_"+toString(i+1)+";");
    61         if (_param->_have_port_rob_ptr)
    62         vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+"     <= reg_PACKET_ID_"+toString(i+1)+";");
    63         vhdl->set_body (4, "reg_FLAGS_"+toString(i)+"        <= reg_FLAGS_"+toString(i+1)+";");
    64         vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+"    <= reg_EXCEPTION_"+toString(i+1)+";");
    65         vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+"  <= reg_NO_SEQUENCE_"+toString(i+1)+";");
    66         vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+"      <= reg_ADDRESS_"+toString(i+1)+";");
    67         vhdl->set_body (4, "reg_DATA_"+toString(i)+"         <= reg_DATA_"+toString(i+1)+";");
    68        
    69         vhdl->set_body (3,"end if;");
    70 
    71         vhdl->set_body (2,"end if;");
    72       }
    73 
    74     vhdl->set_body (2,"if sig_WEN_"+toString(_param->_size_queue-1)+" = '1' then");
    75     if (_param->_have_port_context_id)
    76       vhdl->set_body (3,"reg_CONTEXT_ID_"+toString(_param->_size_queue-1)+"    <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
    77     if (_param->_have_port_front_end_id)
    78       vhdl->set_body (3,"reg_FRONT_END_ID_"+toString(_param->_size_queue-1)+"  <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
    79     if (_param->_have_port_ooo_engine_id)
    80       vhdl->set_body (3,"reg_OOO_ENGINE_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
    81     if (_param->_have_port_rob_ptr)
    82       vhdl->set_body (3,"reg_PACKET_ID_"+toString(_param->_size_queue-1)+"     <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
    83     vhdl->set_body (3, "reg_FLAGS_"+toString(_param->_size_queue-1)+"        <= in_EXECUTE_QUEUE_IN_FLAGS;");
    84     vhdl->set_body (3, "reg_EXCEPTION_"+toString(_param->_size_queue-1)+"    <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
    85     vhdl->set_body (3, "reg_NO_SEQUENCE_"+toString(_param->_size_queue-1)+"  <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
    86     vhdl->set_body (3, "reg_ADDRESS_"+toString(_param->_size_queue-1)+"      <= in_EXECUTE_QUEUE_IN_ADDRESS;");
    87     vhdl->set_body (3, "reg_DATA_"+toString(_param->_size_queue-1)+"         <= in_EXECUTE_QUEUE_IN_DATA;");
    88     vhdl->set_body (2,"end if;");
    89 
    90 
    91     vhdl->set_body (1,"end if;");
    92     vhdl->set_body (0,"end process;");
    93 
    94 
    95     vhdl->set_body (0,"");
    96     vhdl->set_body (0,"");
    97     vhdl->set_body (0,"");
    98 
    99     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_VAL <= sig_OUT_VAL;");
    100     vhdl->set_body (0,"out_EXECUTE_QUEUE_IN_ACK <= sig_IN_ACK;");
    101     if (_param->_have_port_context_id)
    102     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID <= reg_CONTEXT_ID_0;");
    103     if (_param->_have_port_front_end_id)
    104     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID <= reg_FRONT_END_ID_0;");
    105     if (_param->_have_port_ooo_engine_id)
    106     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= reg_OOO_ENGINE_ID_0;");
    107     if (_param->_have_port_rob_ptr)
    108     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID <= reg_PACKET_ID_0;");
    109     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_FLAGS <= reg_FLAGS_0;");
    110     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_EXCEPTION <= reg_EXCEPTION_0;");
    111     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_NO_SEQUENCE <= reg_NO_SEQUENCE_0;");
    112     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_ADDRESS <= reg_ADDRESS_0;");
    113     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_DATA <= reg_DATA_0;");
    114 
    115 
    116     vhdl->set_body (0,"");
    117 
    118     vhdl->set_body (0,"process (reg_CURRENT_STATE, in_EXECUTE_QUEUE_OUT_ACK, in_EXECUTE_QUEUE_IN_VAL, in_NRESET)");
    119     vhdl->set_body (0,"begin");
    120     vhdl->set_body (1,"if in_NRESET = '0' then");
    121     vhdl->set_body (2,"sig_NEXT_STATE <= STATE_0;");
    122     vhdl->set_body (1,"else");
    123     vhdl->set_body (2,"case reg_CURRENT_STATE is");
    124     for (uint32_t i = 0; i <_param->_size_queue + 1; i++)
    125       {
    126         vhdl->set_body (3,"when STATE_"+toString(i)+" =>");
    127         if (i == 0)
    128           {
    129             vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' then");
    130             vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';");
    131             vhdl->set_body (4,"else");
    132             vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
    133             vhdl->set_body (4,"end if;");
    134             continue;
    135           }
    136         if (i == (_param->_size_queue))
    137           {
    138             vhdl->set_body (4,"if in_EXECUTE_QUEUE_OUT_ACK = '1' then");
    139             vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);");
    140             vhdl->set_body (4,"else");
    141             vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
    142             vhdl->set_body (4,"end if;");
    143             continue;
    144           }
    145         vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' and in_EXECUTE_QUEUE_OUT_ACK = '0' then");
    146         vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';");
    147         vhdl->set_body (4,"elsif in_EXECUTE_QUEUE_IN_VAL = '0' and in_EXECUTE_QUEUE_OUT_ACK = '1' then");
    148         vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);");
    149         vhdl->set_body (4,"else");
    150         vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
    151         vhdl->set_body (4,"end if;");
    152       }
    153     vhdl->set_body (3,"when others => assert false report \"wrong state\" severity failure;");
    154     vhdl->set_body (2,"end case;");
    155     vhdl->set_body (1,"end if;");
    156 
    157     vhdl->set_body (2,"case reg_CURRENT_STATE is");
    158     for (uint32_t i = 0; i <_param->_size_queue + 1; i++)
    159       {
    160         vhdl->set_body (3,"when STATE_"+toString(i)+" =>");
    161         if (i == 0)
    162           {
    163             vhdl->set_body (4,"sig_OUT_VAL <= '0';");
    164             vhdl->set_body (4,"sig_IN_ACK <= '1';");
    165             for (uint32_t j = 0; j <_param->_size_queue; j++)
    166               {
    167                 if (i == j)
    168                   {
    169                     vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
    170                     vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL;");
    171                   }
    172                 else
    173                   {
    174                     if (j < (_param->_size_queue - 1))
    175                       vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
    176                     vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
    177                   }
    178               }
    179             continue;
    180           }
    181         if (i == (_param->_size_queue))
    182           {
    183             vhdl->set_body (4,"sig_OUT_VAL <= '1';");
    184             vhdl->set_body (4,"sig_IN_ACK <= '0';");
    185             for (uint32_t j = 0; j <_param->_size_queue; j++)
    186               {
    187                 if (j == (i - 1))
    188                   {
    189                     vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
    190                   }
    191                 else
    192                   {
    193                     vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
    194                     vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
    195                   }
    196               }
    197             continue;
    198           }
    199         vhdl->set_body (4,"sig_OUT_VAL <= '1';");
    200         vhdl->set_body (4,"sig_IN_ACK <= '1';");
    201         for (uint32_t j = 0; j <_param->_size_queue; j++)
    202           {
    203             if (j < (i - 1))
    204               {
    205                 vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
    206                 vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
    207               }
    208             if (j == (i - 1))
    209               {
    210                 vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
    211                 vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK and in_EXECUTE_QUEUE_IN_VAL;");
    212               }
    213             if (j == i)
    214               {
    215                 if (j < (_param->_size_queue - 1))
    216                   vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
    217                 vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK;");
    218               }
    219             if (j > i)
    220               {
    221                 if (j < (_param->_size_queue - 1))
    222                   vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
    223                 vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
    224               }
    225           }
    226       }
    227     vhdl->set_body (3,"when others =>");
    228     vhdl->set_body (2,"end case;");
    229 
    230     vhdl->set_body (0,"end process;");
    231 
    232  
    233 
     207
     208//     vhdl->set_body (1,"end if;");
     209//     vhdl->set_body (0,"end process;");
     210
     211
     212//     vhdl->set_body (0,"");
     213//     vhdl->set_body (0,"");
     214//     vhdl->set_body (0,"");
     215
     216//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_VAL <= sig_OUT_VAL;");
     217//     vhdl->set_body (0,"out_EXECUTE_QUEUE_IN_ACK <= sig_IN_ACK;");
     218//     if (_param->_have_port_context_id)
     219//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID <= reg_CONTEXT_ID_0;");
     220//     if (_param->_have_port_front_end_id)
     221//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID <= reg_FRONT_END_ID_0;");
     222//     if (_param->_have_port_ooo_engine_id)
     223//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= reg_OOO_ENGINE_ID_0;");
     224//     if (_param->_have_port_rob_ptr)
     225//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID <= reg_PACKET_ID_0;");
     226//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_FLAGS <= reg_FLAGS_0;");
     227//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_EXCEPTION <= reg_EXCEPTION_0;");
     228//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_NO_SEQUENCE <= reg_NO_SEQUENCE_0;");
     229//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_ADDRESS <= reg_ADDRESS_0;");
     230//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_DATA <= reg_DATA_0;");
     231
     232
     233//     vhdl->set_body (0,"");
     234
     235//     vhdl->set_body (0,"process (reg_CURRENT_STATE, in_EXECUTE_QUEUE_OUT_ACK, in_EXECUTE_QUEUE_IN_VAL, in_NRESET)");
     236//     vhdl->set_body (0,"begin");
     237//     vhdl->set_body (1,"if in_NRESET = '0' then");
     238//     vhdl->set_body (2,"sig_NEXT_STATE <= STATE_0;");
     239//     vhdl->set_body (1,"else");
     240//     vhdl->set_body (2,"case reg_CURRENT_STATE is");
     241//     for (uint32_t i = 0; i <_param->_size_queue + 1; i++)
     242//       {
     243//      vhdl->set_body (3,"when STATE_"+toString(i)+" =>");
     244//      if (i == 0)
     245//        {
     246//          vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' then");
     247//          vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';");
     248//          vhdl->set_body (4,"else");
     249//          vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
     250//          vhdl->set_body (4,"end if;");
     251//          continue;
     252//        }
     253//      if (i == (_param->_size_queue))
     254//        {
     255//          vhdl->set_body (4,"if in_EXECUTE_QUEUE_OUT_ACK = '1' then");
     256//          vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);");
     257//          vhdl->set_body (4,"else");
     258//          vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
     259//          vhdl->set_body (4,"end if;");
     260//          continue;
     261//        }
     262//      vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' and in_EXECUTE_QUEUE_OUT_ACK = '0' then");
     263//      vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';");
     264//      vhdl->set_body (4,"elsif in_EXECUTE_QUEUE_IN_VAL = '0' and in_EXECUTE_QUEUE_OUT_ACK = '1' then");
     265//      vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);");
     266//      vhdl->set_body (4,"else");
     267//      vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
     268//      vhdl->set_body (4,"end if;");
     269//       }
     270//     vhdl->set_body (3,"when others => assert false report \"wrong state\" severity failure;");
    234271//     vhdl->set_body (2,"end case;");
    235 //     for (uint32_t i = 0; i <_param->_size_queue; i++)
     272//     vhdl->set_body (1,"end if;");
     273
     274//     vhdl->set_body (2,"case reg_CURRENT_STATE is");
     275//     for (uint32_t i = 0; i <_param->_size_queue + 1; i++)
    236276//       {
    237 //      if (i == 0)
    238 //        vhdl->set_body (4,"sig_WEN_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_VAL;");
    239 //      else
    240 //        vhdl->set_body (4,"sig_WEN_"+toString(i)+" <= '0';");
    241 //      if (i < _param->_size_queue - 1)
    242 //        vhdl->set_body (4,"sig_SEL_"+toString(i)+" <= '0';");
     277//      vhdl->set_body (3,"when STATE_"+toString(i)+" =>");
     278//      if (i == 0)
     279//        {
     280//          vhdl->set_body (4,"sig_OUT_VAL <= '0';");
     281//          vhdl->set_body (4,"sig_IN_ACK <= '1';");
     282//          for (uint32_t j = 0; j <_param->_size_queue; j++)
     283//            {
     284//              if (i == j)
     285//                {
     286//                  vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
     287//                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL;");
     288//                }
     289//              else
     290//                {
     291//                  if (j < (_param->_size_queue - 1))
     292//                    vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
     293//                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
     294//                }
     295//            }
     296//          continue;
     297//        }
     298//      if (i == (_param->_size_queue))
     299//        {
     300//          vhdl->set_body (4,"sig_OUT_VAL <= '1';");
     301//          vhdl->set_body (4,"sig_IN_ACK <= '0';");
     302//          for (uint32_t j = 0; j <_param->_size_queue; j++)
     303//            {
     304//              if (j == (i - 1))
     305//                {
     306//                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
     307//                }
     308//              else
     309//                {
     310//                  vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
     311//                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
     312//                }
     313//            }
     314//          continue;
     315//        }
     316//      vhdl->set_body (4,"sig_OUT_VAL <= '1';");
     317//      vhdl->set_body (4,"sig_IN_ACK <= '1';");
     318//      for (uint32_t j = 0; j <_param->_size_queue; j++)
     319//        {
     320//          if (j < (i - 1))
     321//            {
     322//              vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
     323//              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
     324//            }
     325//          if (j == (i - 1))
     326//            {
     327//              vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
     328//              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK and in_EXECUTE_QUEUE_IN_VAL;");
     329//            }
     330//          if (j == i)
     331//            {
     332//              if (j < (_param->_size_queue - 1))
     333//                vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
     334//              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK;");
     335//            }
     336//          if (j > i)
     337//            {
     338//              if (j < (_param->_size_queue - 1))
     339//                vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
     340//              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
     341//            }
     342//        }
    243343//       }
    244 //     vhdl->set_body (2,"end process;");
    245        
    246 //     vhdl->set_body (0,"sig_TRANS_OUT <=");
    247 //     vhdl->set_body (1,"'0' when reg_CURRENT_STATE = STATE_0 else");
    248 //     vhdl->set_body (1,"'1';");
    249 
    250 //     vhdl->set_body (0,"sig_TRANS_IN <=");
    251 //     vhdl->set_body (1,"'0' when reg_CURRENT_STATE = STATE_"+toString(_param->_size_queue)+" else");
    252 //     vhdl->set_body (1,"'1';");
    253 
    254 
    255 
    256 //     vhdl->set_body (0,"sig_NEXT_STATE <=");
    257 //     vhdl->set_body (1,"reg_CURRENT_STATE("+toString(_param->_size_queue-1)+" downto 0) & '0' when in_EXECUTE_QUEUE_IN_VAL = '1' and ((reg_CURRENT_STATE = STATE_0) xor (in_EXECUTE_QUEUE_OUT_ACK = '0')) and sig_TRANS_IN = '1' else");
    258 //     vhdl->set_body (1,"'0' & reg_CURRENT_STATE("+toString(_param->_size_queue)+" downto 1) when in_EXECUTE_QUEUE_OUT_ACK = '1' and ((in_EXECUTE_QUEUE_IN_VAL = '0') xor (reg_CURRENT_STATE = STATE_"+toString(_param->_size_queue)+")) and sig_TRANS_OUT = '1' else");
    259 //     vhdl->set_body (1,"reg_CURRENT_STATE;");
    260 
    261 //     vhdl->set_body (0,"sig_WEN_0 <=");
    262 //     vhdl->set_body (1,"in_EXECUTE_QUEUE_IN_VAL when reg_CURRENT_STATE = STATE_0 else");
    263 //     vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK and in_EXECUTE_QUEUE_IN_VAL when reg_CURRENT_STATE = STATE_1 else");
    264 //     vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK;");
    265 //      for (uint32_t i = 1; i <_param->_size_queue-1; i++)
    266 //       {
    267 //      vhdl->set_body (0,"sig_WEN_"+toString(i)+" <=");
    268 //      vhdl->set_body (1,"in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK when reg_CURRENT_STATE = STATE_"+toString(i)+" else");
    269 //      vhdl->set_body (1,"in_EXECUTE_QUEUE_IN_VAL and in_EXECUTE_QUEUE_OUT_ACK when reg_CURRENT_STATE = STATE_"+toString(i+1)+" else");
    270 //      vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK;");
    271 //       }
    272 //     vhdl->set_body (0,"sig_WEN_"+toString(_param->_size_queue-1)+" <=");
    273 //     vhdl->set_body (1,"in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK when reg_CURRENT_STATE = STATE_"+toString(_param->_size_queue-1)+" else");
    274 //     vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK;");
    275 
    276 //     vhdl->set_body (0,"");
    277 //     for (uint32_t i = 0; i <_param->_size_queue-1; i++)
    278 //       {
    279 //      vhdl->set_body (0,"sig_SEL_"+toString(i)+" <=");
    280 //      vhdl->set_body (1,"'0' when reg_CURRENT_STATE = STATE_"+toString(i+1)+" or reg_CURRENT_STATE = STATE_"+toString(i)+" else");
    281 //      vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK;");
    282 //       }
    283 
    284 //   process (reg_CURRENT_STATE, in_PUSH_0_VAL, in_POP_0_ACK)
    285 //   begin
    286 //     case reg_CURRENT_STATE is
    287    
    288 // with reg_CURRENT_STATE select
    289 //   sig_WEN0 <=
    290 //   0 when 1,
    291 //   4 when 6;
    292 //       when "00001" => out_POP_0_VAL <= '0';
    293 //                      out_PUSH_0_ACK <= '1';
    294 //                      sig_SEL0 <= '0';
    295 //                      sig_WEN0 <= in_PUSH_0_VAL;
    296 //                      sig_SEL1 <= '0';
    297 //                      sig_WEN1 <= '0';
    298 //                      sig_SEL2 <= '0';
    299 //                      sig_WEN2 <= '0';
    300 //                      sig_WEN3 <= '0';
    301 //                      if in_PUSH_0_VAL = '1' then
    302 //                        sig_NEXT_STATE <= reg_CURRENT_STATE(3 downto 0) & '0';
    303 //                      else
    304 //                        sig_NEXT_STATE <= reg_CURRENT_STATE;
    305 //                      end if;
    306 
    307 //       when "00010" => out_POP_0_VAL <= '1';
    308 //                      out_PUSH_0_ACK <= '1';
    309 //                      sig_SEL0 <= '0';
    310 //                      sig_WEN0 <= in_POP_0_ACK and in_PUSH_0_VAL;
    311 //                      sig_SEL1 <= '0';
    312 //                      sig_WEN1 <= in_PUSH_0_VAL and not in_POP_0_ACK;
    313 //                      sig_SEL2 <= '0';
    314 //                      sig_WEN2 <= '0';
    315 //                      sig_WEN3 <= '0';
    316 //                      if (in_PUSH_0_VAL = '1') and (in_POP_0_ACK = '0') then
    317 //                        sig_NEXT_STATE <= reg_CURRENT_STATE(3 downto 0) & '0';
    318 //                      elsif (in_PUSH_0_VAL = '0') and (in_POP_0_ACK = '1') then
    319 //                        sig_NEXT_STATE <= '0' & reg_CURRENT_STATE(4 downto 1);
    320 //                      else
    321 //                        sig_NEXT_STATE <= reg_CURRENT_STATE;
    322 //                      end if;
    323 
    324 //       when "00100" => out_POP_0_VAL <= '1';
    325 //                      out_PUSH_0_ACK <= '1';
    326 //                      sig_SEL0 <= in_POP_0_ACK;
    327 //                      sig_WEN0 <= in_POP_0_ACK;
    328 //                      sig_SEL1 <= '0';
    329 //                      sig_WEN1 <= in_POP_0_ACK and in_PUSH_0_VAL;
    330 //                      sig_SEL2 <= '0';
    331 //                      sig_WEN2 <= in_PUSH_0_VAL and not in_POP_0_ACK;
    332 //                      sig_WEN3 <= '0';
    333 //                      if (in_PUSH_0_VAL = '1') and (in_POP_0_ACK = '0') then
    334 //                        sig_NEXT_STATE <= reg_CURRENT_STATE(3 downto 0) & '0';
    335 //                      elsif (in_PUSH_0_VAL = '0') and (in_POP_0_ACK = '1') then
    336 //                        sig_NEXT_STATE <= '0' & reg_CURRENT_STATE(4 downto 1);
    337 //                      else
    338 //                        sig_NEXT_STATE <= reg_CURRENT_STATE;
    339 //                      end if;
    340 
    341 //       when "01000" => out_POP_0_VAL <= '1';
    342 //                      out_PUSH_0_ACK <= '1';
    343 //                      sig_SEL0 <= in_POP_0_ACK;
    344 //                      sig_WEN0 <= in_POP_0_ACK;
    345 //                      sig_SEL1 <= in_POP_0_ACK;
    346 //                      sig_WEN1 <= in_POP_0_ACK;
    347 //                      sig_SEL2 <= '0';
    348 //                      sig_WEN2 <= in_POP_0_ACK and in_PUSH_0_VAL;
    349 //                      sig_WEN3 <= in_PUSH_0_VAL and not in_POP_0_ACK;
    350 //                      if (in_PUSH_0_VAL = '1') and (in_POP_0_ACK = '0') then
    351 //                        sig_NEXT_STATE <= reg_CURRENT_STATE(3 downto 0) & '0';
    352 //                      elsif (in_PUSH_0_VAL = '0') and (in_POP_0_ACK = '1') then
    353 //                        sig_NEXT_STATE <= '0' & reg_CURRENT_STATE(4 downto 1);
    354 //                      else
    355 //                        sig_NEXT_STATE <= reg_CURRENT_STATE;
    356 //                      end if;
    357 
    358 //       when "10000" => out_POP_0_VAL <= '1';
    359 //                      out_PUSH_0_ACK <= '0';
    360 //                      sig_SEL0 <= in_POP_0_ACK;
    361 //                      sig_WEN0 <= in_POP_0_ACK;
    362 //                      sig_SEL1 <= in_POP_0_ACK;
    363 //                      sig_WEN1 <= in_POP_0_ACK;
    364 //                      sig_SEL2 <= in_POP_0_ACK;
    365 //                      sig_WEN2 <= in_POP_0_ACK;
    366 //                      sig_WEN3 <= '0';
    367 //                      if (in_PUSH_0_VAL = '0') and (in_POP_0_ACK = '1') then
    368 //                        sig_NEXT_STATE <= '0' & reg_CURRENT_STATE(4 downto 1);
    369 //                      else
    370 //                        sig_NEXT_STATE <= reg_CURRENT_STATE;
    371 //                      end if;
    372 
    373 //          when others =>
    374 //                      sig_next_state <= "00001";
    375 
    376 //      end case;
    377 //   end process;
     344//     vhdl->set_body (3,"when others =>");
     345//     vhdl->set_body (2,"end case;");
     346//     vhdl->set_body (0,"end process;");
    378347
    379348    log_printf(FUNC,Execute_queue,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_declaration.cpp

    r96 r98  
    2525    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
    2626
    27     for (uint32_t i=0; i<_param->_size_queue; ++i)
     27    vhdl->set_alias  ("internal_QUEUE_INSERT_VAL     ",1," in_EXECUTE_QUEUE_IN_VAL",std_logic_range(1));
     28    vhdl->set_alias  ("internal_QUEUE_INSERT_ACK     ",1,"out_EXECUTE_QUEUE_IN_ACK",std_logic_range(1));
     29    vhdl->set_signal ("internal_QUEUE_INSERT_DATA    ",_param->_size_internal_queue);
     30    vhdl->set_signal ("internal_QUEUE_RETIRE_DATA    ",_param->_size_internal_queue);
     31    vhdl->set_alias  ("internal_QUEUE_RETIRE_VAL     ",1,"out_EXECUTE_QUEUE_OUT_VAL",std_logic_range(1));
     32    vhdl->set_alias  ("internal_QUEUE_RETIRE_ACK     ",1," in_EXECUTE_QUEUE_OUT_ACK",std_logic_range(1));
     33
     34    uint32_t min = 0;
     35    uint32_t max, size;
     36
     37    if(_param->_have_port_context_id   )
    2838      {
    29         if (_param->_have_port_context_id)
    30           vhdl->set_signal("reg_CONTEXT_ID_"+toString(i),_param->_size_context_id);
    31         if (_param->_have_port_front_end_id)
    32           vhdl->set_signal("reg_FRONT_END_ID_"+toString(i),_param->_size_front_end_id);
    33         if (_param->_have_port_ooo_engine_id)
    34           vhdl->set_signal("reg_OOO_ENGINE_ID_"+toString(i),_param->_size_ooo_engine_id);
    35         if (_param->_have_port_rob_ptr)
    36           vhdl->set_signal("reg_PACKET_ID_"+toString(i),_param->_size_rob_ptr);
    37         vhdl->set_signal("reg_FLAGS_"+toString(i),_param->_size_special_data);
    38         vhdl->set_signal("reg_EXCEPTION_"+toString(i),_param->_size_exception);
    39         vhdl->set_signal("reg_NO_SEQUENCE_"+toString(i),1);
    40         vhdl->set_signal("reg_ADDRESS_"+toString(i),_param->_size_instruction_address);
    41         vhdl->set_signal("reg_DATA_"+toString(i),_param->_size_general_data);
     39        size = _param->_size_context_id;
     40        max = min-1+size;
     41        vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_CONTEXT_ID           ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
     42        min = max+1;
     43      }
     44    if(_param->_have_port_front_end_id   )
     45      {
     46        size = _param->_size_front_end_id;
     47        max = min-1+size;
     48        vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_FRONT_END_ID         ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
     49        min = max+1;
     50      }
     51    if(_param->_have_port_ooo_engine_id   )
     52      {
     53        size = _param->_size_ooo_engine_id;
     54        max = min-1+size;
     55        vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID        ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
     56        min = max+1;
     57      }
     58    if(_param->_have_port_rob_ptr)
     59      {
     60        size = _param->_size_rob_ptr;
     61        max = min-1+size;
     62        vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_PACKET_ID            ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
     63        min = max+1;
    4264      }
    4365
    44     vhdl->set_signal("reg_CURRENT_STATE",_param->_size_queue+1);
     66//  size = _param->_size_operation;
     67//  max = min-1+size;
     68//  vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_OPERATION            ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
     69//  min = max+1;
     70//
     71//  size = _param->_size_type;
     72//  max = min-1+size;
     73//  vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_TYPE                 ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
     74//  min = max+1;
    4575
    46     vhdl->set_signal("sig_NEXT_STATE",_param->_size_queue+1);
     76    size = _param->_size_special_data;
     77    max = min-1+size;
     78    vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_FLAGS                ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
     79    min = max+1;
    4780
    48     for (uint32_t i=0; i<_param->_size_queue-1; ++i)
    49       {
    50         vhdl->set_signal("sig_WEN_"+toString(i),1);
    51         vhdl->set_signal("sig_SEL_"+toString(i),1);
    52       }
    53     vhdl->set_signal("sig_WEN_"+toString(_param->_size_queue - 1),1);
     81    size = _param->_size_exception;   
     82    max = min-1+size;
     83    vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_EXCEPTION            ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
     84    min = max+1;
    5485
    55     vhdl->set_signal("sig_IN_ACK",1);
    56     vhdl->set_signal("sig_OUT_VAL",1);
     86    size = 1;
     87    max = min-1+size;
     88    vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE          ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
     89    min = max+1;
    5790
    58    for (uint32_t i=0; i<_param->_size_queue+1; ++i)
    59       vhdl->set_constant("STATE_"+toString(i),_param->_size_queue+1,1<<i);
     91    size = _param->_size_instruction_address;
     92    max = min-1+size;
     93    vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_ADDRESS              ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
     94    min = max+1;
     95
     96    size = _param->_size_general_data;
     97    max = min-1+size;
     98    vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_DATA                 ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
     99    min = max+1;
     100
     101
     102//     for (uint32_t i=0; i<_param->_size_queue; ++i)
     103//       {
     104//      if (_param->_have_port_context_id)
     105//      vhdl->set_signal("reg_CONTEXT_ID_"+toString(i),_param->_size_context_id);
     106//      if (_param->_have_port_front_end_id)
     107//      vhdl->set_signal("reg_FRONT_END_ID_"+toString(i),_param->_size_front_end_id);
     108//      if (_param->_have_port_ooo_engine_id)
     109//      vhdl->set_signal("reg_OOO_ENGINE_ID_"+toString(i),_param->_size_ooo_engine_id);
     110//      if (_param->_have_port_rob_ptr)
     111//      vhdl->set_signal("reg_PACKET_ID_"+toString(i),_param->_size_rob_ptr);
     112//      vhdl->set_signal("reg_FLAGS_"+toString(i),_param->_size_special_data);
     113//      vhdl->set_signal("reg_EXCEPTION_"+toString(i),_param->_size_exception);
     114//      vhdl->set_signal("reg_NO_SEQUENCE_"+toString(i),1);
     115//      vhdl->set_signal("reg_ADDRESS_"+toString(i),_param->_size_instruction_address);
     116//      vhdl->set_signal("reg_DATA_"+toString(i),_param->_size_general_data);
     117//       }
     118
     119//     vhdl->set_signal("reg_CURRENT_STATE",_param->_size_queue+1);
     120
     121//     vhdl->set_signal("sig_NEXT_STATE",_param->_size_queue+1);
     122
     123//     for (uint32_t i=0; i<_param->_size_queue-1; ++i)
     124//       {
     125//      vhdl->set_signal("sig_WEN_"+toString(i),1);
     126//      vhdl->set_signal("sig_SEL_"+toString(i),1);
     127//       }
     128//     vhdl->set_signal("sig_WEN_"+toString(_param->_size_queue - 1),1);
     129
     130//     vhdl->set_signal("sig_IN_ACK",1);
     131//     vhdl->set_signal("sig_OUT_VAL",1);
     132
     133//    for (uint32_t i=0; i<_param->_size_queue+1; ++i)
     134//       vhdl->set_constant("STATE_"+toString(i),_param->_size_queue+1,1<<i);
    60135
    61136    log_printf(FUNC,Execute_queue,FUNCTION,"End");
     
    72147}; // end namespace morpheo             
    73148#endif
    74 //   signal reg_0             : std_logic_vector (15 downto 0);
    75 //   signal reg_1             : std_logic_vector (15 downto 0);
    76 //   signal reg_2             : std_logic_vector (15 downto 0);
    77 //   signal reg_3             : std_logic_vector (15 downto 0);
    78 //   signal reg_CURRENT_STATE : std_logic_vector (4 downto 0);
    79 
    80 //   signal sig_NEXT_STATE    : std_logic_vector (4 downto 0);
    81 //   signal sig_WEN0          : std_logic;
    82 //   signal sig_SEL0          : std_logic;
    83 //   signal sig_WEN1          : std_logic;
    84 //   signal sig_SEL1          : std_logic;
    85 //   signal sig_WEN2          : std_logic;
    86 //   signal sig_SEL2          : std_logic;
    87 //   signal sig_WEN3          : std_logic;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp

    r97 r98  
    3838
    3939    test();
     40
     41    _size_internal_queue =
     42      (log2( nb_context   )      +
     43       log2( nb_front_end )      +
     44       log2( nb_ooo_engine)      +
     45       log2( nb_packet    )      +     
     46//      size_operation           +
     47//      size_type                +
     48        size_special_data        +
     49       _size_exception           +
     50       1                         +
     51        size_general_data        +
     52        size_general_data
     53       );
    4054
    4155    if (is_toplevel)
Note: See TracChangeset for help on using the changeset viewer.