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_OOO_Engine/OOO_Engine/Commit_unit/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp

    r127 r134  
    358358
    359359#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
    360     directory_init ();
    361 
    362     instruction_log_file = new std::ofstream [_param->_nb_thread];
    363     for (uint32_t i=0; i<_param->_nb_thread; ++i)
    364       if (_param->_have_thread [i])
    365         {
    366          
    367           std::string filename = morpheo::filename(MORPHEO_LOG,
    368                                                    "Instruction_flow-thread_"+toString(i),
    369                                                    "",
    370                                                    "log",
    371                                                    _simulation_file_with_date,
    372                                                    _simulation_file_with_pid ,
    373                                                    true);
    374          
    375           instruction_log_file [i].open(filename.c_str() ,std::ios::out | std::ios::trunc);
    376         }
     360    if (log_file_generate)
     361      {
     362        directory_init ();
     363       
     364        instruction_log_file = new std::ofstream [_param->_nb_thread];
     365        for (uint32_t i=0; i<_param->_nb_thread; ++i)
     366          if (_param->_have_thread [i])
     367            {
     368             
     369              std::string filename = morpheo::filename(MORPHEO_LOG,
     370                                                       "Instruction_flow-thread_"+toString(i),
     371                                                       "",
     372                                                       "log",
     373                                                       _simulation_file_with_date,
     374                                                       _simulation_file_with_pid ,
     375                                                       true);
     376             
     377              instruction_log_file [i].open(filename.c_str() ,std::ios::out | std::ios::trunc);
     378            }
     379      }
    377380#endif
    378381
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp

    r128 r134  
    239239
    240240#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
    241     {   
    242       for (uint32_t i=0; i<_param->_nb_thread; ++i)
    243         if (_param->_have_thread [i])
    244           {
    245             instruction_log_file [i].close();
    246           }
    247       delete [] instruction_log_file;
    248     }
     241    if (log_file_generate)
     242      {   
     243        for (uint32_t i=0; i<_param->_nb_thread; ++i)
     244          if (_param->_have_thread [i])
     245            {
     246              instruction_log_file [i].close();
     247            }
     248        delete [] instruction_log_file;
     249      }
    249250#endif
    250251
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r128 r134  
    831831
    832832#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
    833                     {
    834                       // log file
    835                       instruction_log_file [num_thread]
    836                         << "[" << simulation_cycle() << "] "
    837                         << std::hex
    838                         << (entry->address<<2) << " (" << (entry->address) << ") "
    839                         << std::dec
    840                         << "[" << entry->cycle_rob_in << ", " << entry->cycle_commit << "] "
    841                         << "{" << ((retire_ok)?"OK":"KO") << "} ";
    842                      
    843                       if ((type == TYPE_MEMORY) and  is_operation_memory_load(entry->operation))
    844                         instruction_log_file [num_thread] << std::hex << entry->load_data << std::dec;
    845                      
    846                       instruction_log_file [num_thread] << std::endl;
    847                     }
     833                    if (log_file_generate)
     834                      {
     835                        // log file
     836                        instruction_log_file [num_thread]
     837                          << "[" << simulation_cycle() << "] "
     838                          << std::hex
     839                          << (entry->address<<2) << " (" << (entry->address) << ") "
     840                          << std::dec
     841                          << "[" << entry->cycle_rob_in << ", " << entry->cycle_commit << "] "
     842                          << "{" << ((retire_ok)?"OK":"KO") << "} ";
     843                       
     844                        if ((type == TYPE_MEMORY) and  is_operation_memory_load(entry->operation))
     845                          instruction_log_file [num_thread] << std::hex << entry->load_data << std::dec;
     846                       
     847                        instruction_log_file [num_thread] << std::endl;
     848                      }
    848849#endif     
    849850
Note: See TracChangeset for help on using the changeset viewer.