Changeset 138 for trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Timestamp:
- May 12, 2010, 7:34:01 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Debug_signal.cpp
r137 r138 38 38 void debug_signal::print (void) 39 39 { 40 msg ("List of access signal\n");40 msgInformation("List of access signal\n"); 41 41 for (std::list<std::string>::iterator it = _signal_access.begin(); 42 42 it != _signal_access.end(); 43 43 ++ it) 44 44 { 45 msg (" * %s\n",(*it).c_str());45 msgInformation(" * %s\n",(*it).c_str()); 46 46 } 47 47 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp
r135 r138 77 77 if ((_usage & USE_SYSTEMC) and 78 78 ((*it)->get_direction() == INTERNAL)) 79 delete (*it)->get_sc_signal();79 (*it)->dealloc(); 80 80 delete (*it); 81 81 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation.cpp
r124 r138 18 18 double _simulation_nb_instruction; 19 19 std::vector<double> _simulation_nb_instruction_commited; 20 stop_type_t _simulation_stop_type; 20 21 bool _simulation_file_with_date; 21 22 bool _simulation_file_with_pid ; … … 23 24 Model _model; 24 25 25 void simulation_init (double nb_cycle, 26 double debug_nb_cycle, 27 double nb_instruction, 28 bool file_with_date, 29 bool file_with_pid ) 26 void simulation_init (double nb_cycle, 27 double debug_nb_cycle, 28 double nb_instruction, 29 stop_type_t stop_type, 30 bool file_with_date, 31 bool file_with_pid ) 30 32 { 31 33 if (not simulation_initialized) … … 44 46 _simulation_nb_instruction = nb_instruction; 45 47 // _simulation_nb_instruction_commited = new std::vector<double>; 48 _simulation_stop_type = stop_type; 46 49 _simulation_file_with_date = file_with_date; 47 50 _simulation_file_with_pid = file_with_pid ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation_test_end.cpp
r124 r138 35 35 { 36 36 end_inst = true; 37 std::vector<double>::iterator it=_simulation_nb_instruction_commited.begin(); 37 38 38 std::vector<double>::iterator it=_simulation_nb_instruction_commited.begin(); 39 40 // Scan all context and test if all can finish 41 while (end_inst and it!=_simulation_nb_instruction_commited.end()) 39 switch (_simulation_stop_type) 42 40 { 43 end_inst &= (_simulation_nb_instruction <= *it); 44 it ++; 41 case ALL_THREAD : 42 { 43 double sum_inst = 0; 44 45 // Scan all context and test if all can finish 46 while (it!=_simulation_nb_instruction_commited.end()) 47 { 48 sum_inst += *it; 49 it ++; 50 } 51 52 // Stop if sum of all instruction is higher of "simulation_nb_instruction" 53 end_inst &= (_simulation_nb_instruction <= sum_inst); 54 55 break; 56 } 57 case EACH_THREAD_AND_CONTINUE : 58 case EACH_THREAD_AND_STOP : 59 { 60 // Scan all context and test if all can finish 61 while (end_inst and it!=_simulation_nb_instruction_commited.end()) 62 { 63 64 // Stop if all thread have executed more that "simulation_nb_instruction" instructions. 65 end_inst &= (_simulation_nb_instruction <= *it); 66 it ++; 67 } 68 break; 69 } 45 70 } 46 71 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat.cpp
r124 r138 14 14 _save_periodic (_period>0) 15 15 { 16 _generate_file = true; 17 16 18 _list_operand = new std::map<std::string, var_t>; 17 19 _list_expr = new std::list<expr_t>; 18 20 _list_stat = new std::list<Stat *>; 21 _list_counters = new std::list<counters_t *>; 19 22 20 23 _cycle = create_variable("cycle"); 21 24 // _cycle = create_counter("cycle","",""); 22 25 *_cycle = 0; // for the first period 23 24 _generate_file = true;25 26 } 26 27 … … 35 36 _save_periodic (period>0) 36 37 { 38 _generate_file = true; 39 37 40 _list_operand = new std::map<std::string, var_t>; 38 41 _list_expr = new std::list<expr_t>; 39 42 _list_stat = new std::list<Stat *>; 43 _list_counters = new std::list<counters_t *>; 40 44 41 45 _cycle = create_variable("cycle"); 42 46 // _cycle = create_counter("cycle","",""); 43 47 *_cycle = 0; // for the first period 44 45 _generate_file = true;46 48 } 47 49 … … 68 70 } 69 71 delete _list_expr; 72 73 // parcourir la liste et desallouer les arbres 74 for (std::list<counters_t*>::iterator i=_list_counters->begin(); 75 i!= _list_counters->end(); 76 ++i) 77 { 78 delete *i; 79 } 80 delete _list_counters; 81 70 82 delete _list_stat; 71 83 }
Note: See TracChangeset
for help on using the changeset viewer.