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_Write_unit/Write_unit/Execute_queue/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue.cpp

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

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

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

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

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

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

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