Ignore:
Timestamp:
Jul 15, 2009, 10:41:01 AM (15 years ago)
Author:
rosiere
Message:

1) valgrind fix
2) debug file on/off

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

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp

    r128 r134  
    4848                  }
    4949              }
     50
     51        _execute_operation_out->_context_id    = 0; // not necessary
     52        _execute_operation_out->_front_end_id  = 0; // not necessary
     53        _execute_operation_out->_ooo_engine_id = 0; // not necessary
     54        _execute_operation_out->_packet_id     = 0; // not necessary
     55  //    _execute_operation_out->_operation     = 0; // not necessary
     56  //    _execute_operation_out->_type          = 0; // not necessary
     57        _execute_operation_out->_write_rd      = 0; // not necessary
     58        _execute_operation_out->_num_reg_rd    = 0; // not necessary
     59        _execute_operation_out->_data_rd       = 0; // not necessary
     60        _execute_operation_out->_write_re      = 0; // not necessary
     61        _execute_operation_out->_num_reg_re    = 0; // not necessary
     62        _execute_operation_out->_data_re       = 0; // not necessary
     63        _execute_operation_out->_exception     = 0; // not necessary
     64        _execute_operation_out->_no_sequence   = 0; // not necessary
     65        _execute_operation_out->_address       = 0; // not necessary
    5066      }
    5167    else
  • 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

    r124 r134  
    179179
    180180#if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true)
    181     directory_init ();
    182 
    183     memory_log_file = new std::ofstream [_param->_nb_thread];
    184     for (uint32_t i=0; i<_param->_nb_thread; ++i)
    185       if (_param->_num_thread_valid [i])
    186         {
    187          
    188           std::string filename = morpheo::filename(MORPHEO_LOG,
    189                                                    "Memory_access-thread_"+toString(i),
    190                                                    "",
    191                                                    "log",
    192                                                    _simulation_file_with_date,
    193                                                    _simulation_file_with_pid ,
    194                                                    true);
    195          
    196           memory_log_file [i].open(filename.c_str() ,std::ios::out | std::ios::trunc);
    197         }
     181    if (log_file_generate)
     182      {
     183        directory_init ();
     184       
     185        memory_log_file = new std::ofstream [_param->_nb_thread];
     186        for (uint32_t i=0; i<_param->_nb_thread; ++i)
     187          if (_param->_num_thread_valid [i])
     188            {
     189             
     190              std::string filename = morpheo::filename(MORPHEO_LOG,
     191                                                       "Memory_access-thread_"+toString(i),
     192                                                       "",
     193                                                       "log",
     194                                                       _simulation_file_with_date,
     195                                                       _simulation_file_with_pid ,
     196                                                       true);
     197             
     198              memory_log_file [i].open(filename.c_str() ,std::ios::out | std::ios::trunc);
     199            }
     200      }
    198201#endif
    199202
  • 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

    r128 r134  
    122122
    123123#if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true)
    124     {
    125       for (uint32_t i=0; i<_param->_nb_thread; ++i)
    126         if (_param->_num_thread_valid [i])
    127           {
    128             memory_log_file [i].close();
    129           }
    130       delete [] memory_log_file;
    131     }
     124    if (log_file_generate)
     125      {
     126        for (uint32_t i=0; i<_param->_nb_thread; ++i)
     127          if (_param->_num_thread_valid [i])
     128            {
     129              memory_log_file [i].close();
     130            }
     131        delete [] memory_log_file;
     132      }
    132133#endif
    133134
  • 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

    r128 r134  
    999999
    10001000#if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true)
     1001                  if (log_file_generate)
    10011002                    {
    10021003                      // log file
     
    11931194               
    11941195#if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true)
    1195                 {
    1196                   // log file
    1197                   Tcontext_t num_thread    = get_num_thread(_load_queue [packet_id]._context_id   , _param->_size_context_id   ,
    1198                                                             _load_queue [packet_id]._front_end_id , _param->_size_front_end_id ,
    1199                                                             _load_queue [packet_id]._ooo_engine_id, _param->_size_ooo_engine_id);
    1200                  
    1201                   memory_log_file [num_thread]
    1202                     << "[" << simulation_cycle() << "] "
    1203                     << std::hex
    1204                     << "@ 0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << _load_queue [packet_id]._address << " -[ Read  ]-> 0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << _load_queue [packet_id]._rdata << " "
    1205                     << std::dec
    1206                     << "{" << toString(_load_queue [packet_id]._operation) << "}";
    1207                  
    1208                   memory_log_file [num_thread] << std::endl;
    1209                 }
     1196                if (log_file_generate)
     1197                  {
     1198                    // log file
     1199                    Tcontext_t num_thread    = get_num_thread(_load_queue [packet_id]._context_id   , _param->_size_context_id   ,
     1200                                                              _load_queue [packet_id]._front_end_id , _param->_size_front_end_id ,
     1201                                                              _load_queue [packet_id]._ooo_engine_id, _param->_size_ooo_engine_id);
     1202                   
     1203                    memory_log_file [num_thread]
     1204                      << "[" << simulation_cycle() << "] "
     1205                      << std::hex
     1206                      << "@ 0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << _load_queue [packet_id]._address << " -[ Read  ]-> 0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << _load_queue [packet_id]._rdata << " "
     1207                      << std::dec
     1208                      << "{" << toString(_load_queue [packet_id]._operation) << "}";
     1209                   
     1210                    memory_log_file [num_thread] << std::endl;
     1211                  }
    12101212#endif     
    12111213
Note: See TracChangeset for help on using the changeset viewer.