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

Almost complete design
with Test and test platform

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/test.cpp

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