- Timestamp:
- May 12, 2010, 7:34:01 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.