Changeset 124 for trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Timestamp:
- Jun 17, 2009, 2:11:25 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/src
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_generate_file.cpp
r88 r124 25 25 XML xml = toXML(); 26 26 27 xml.filename_extension (" .pos");27 xml.filename_extension ("pos"); 28 28 29 29 xml.generate_file(MORPHEO_POSITION,"ISO-8859-1"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation.cpp
r112 r124 14 14 15 15 static bool simulation_initialized; 16 bool _simulation_stop_exception; 16 17 double _simulation_nb_cycle; 17 18 double _simulation_nb_instruction; 18 19 std::vector<double> _simulation_nb_instruction_commited; 20 bool _simulation_file_with_date; 21 bool _simulation_file_with_pid ; 22 19 23 Model _model; 20 24 21 25 void simulation_init (double nb_cycle, 22 double nb_instruction) 26 double debug_nb_cycle, 27 double nb_instruction, 28 bool file_with_date, 29 bool file_with_pid ) 23 30 { 24 31 if (not simulation_initialized) 25 32 { 26 _simulation_nb_cycle = nb_cycle; 33 if (debug_nb_cycle == 0) 34 { 35 _simulation_nb_cycle = nb_cycle; 36 _simulation_stop_exception = false; 37 } 38 else 39 { 40 _simulation_nb_cycle = (debug_nb_cycle<nb_cycle)?debug_nb_cycle:nb_cycle; 41 _simulation_stop_exception = (debug_nb_cycle<nb_cycle); 42 } 43 27 44 _simulation_nb_instruction = nb_instruction; 28 45 // _simulation_nb_instruction_commited = new std::vector<double>; 46 _simulation_file_with_date = file_with_date; 47 _simulation_file_with_pid = file_with_pid ; 29 48 30 49 simulation_initialized = true; … … 34 53 msg_printf(WARNING,_("Multi instance of Morpheo : stop condition, take the highest.")); 35 54 36 if (_simulation_nb_cycle < nb_cycle) 37 _simulation_nb_cycle = nb_cycle; 55 if (//(_simulation_nb_cycle == 0) or 56 (_simulation_nb_cycle < debug_nb_cycle)) 57 { 58 _simulation_nb_cycle = debug_nb_cycle; 59 _simulation_stop_exception = true; 60 } 38 61 39 if (_simulation_nb_instruction < nb_instruction) 62 if (//(_simulation_nb_cycle == 0) or 63 (_simulation_nb_cycle < nb_cycle)) 64 { 65 _simulation_nb_cycle = nb_cycle; 66 _simulation_stop_exception = false; 67 } 68 69 if (//(_simulation_nb_instruction == 0) or 70 (_simulation_nb_instruction < nb_instruction)) 40 71 _simulation_nb_instruction = nb_instruction; 72 73 _simulation_file_with_date |= file_with_date; 74 _simulation_file_with_pid |= file_with_pid ; 41 75 } 42 76 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation_test_end.cpp
r117 r124 9 9 #include "Behavioural/include/Simulation.h" 10 10 #include "Common/include/Systemc.h" 11 #include "Common/include/ErrorMorpheo.h" 11 12 12 13 namespace morpheo { … … 47 48 end_inst = true; 48 49 49 return end_cycle and end_inst; 50 if (end_cycle and _simulation_stop_exception) 51 { 52 throw ErrorMorpheo(_("Maximal cycles Reached")); 53 return false; 54 } 55 else 56 return end_cycle and end_inst; 50 57 } 51 58 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat.cpp
r81 r124 19 19 20 20 _cycle = create_variable("cycle"); 21 // _cycle = create_counter("cycle","",""); 21 22 *_cycle = 0; // for the first period 22 23 … … 39 40 40 41 _cycle = create_variable("cycle"); 42 // _cycle = create_counter("cycle","",""); 41 43 *_cycle = 0; // for the first period 42 44 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_end_cycle.cpp
r113 r124 17 17 test_and_save(false); 18 18 } 19 else 20 if ((_cycle_sum+1) == _nb_cycle_before_begin) 21 { 22 // Init counter 23 reset (false); 24 } 19 25 } 20 26 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_generate_file.cpp
r113 r124 30 30 xml->balise_close(); 31 31 32 xml->filename_extension (" .stat");32 xml->filename_extension ("stat"); 33 33 xml->generate_file(MORPHEO_STATISTICS); 34 34 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_test_and_save.cpp
r81 r124 9 9 { 10 10 eval_exprs(false); // evalue les expression non periodique au cycle 11 12 for (std::map<std::string, var_t>::iterator i=_list_operand->begin(); 13 i!= _list_operand->end(); 14 ++i) 15 { 16 // save and reset ! 17 i->second.save_counter.push_back(*(i->second.counter)); 18 *(i->second.counter) = 0; 19 } 11 12 reset (true); 20 13 } 21 14 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML.cpp
r88 r124 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 _filename_extension=" .xml";19 _filename_extension="xml"; 20 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 21 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_generate_file.cpp
r88 r124 8 8 #include "Behavioural/include/XML.h" 9 9 #include "Common/include/ErrorMorpheo.h" 10 #include "Common/include/Filename.h" 10 11 #include <fstream> 11 12 … … 21 22 header (encoding); 22 23 23 std::string filename = dirname + "/" + _name + _filename_extension; 24 std::string filename = morpheo::filename(dirname, 25 _name, 26 "", 27 _filename_extension, 28 _simulation_file_with_date, 29 _simulation_file_with_pid , 30 true); 24 31 25 32 msg_printf(INFORMATION,_("Generate file \"%s\"."),filename.c_str());
Note: See TracChangeset
for help on using the changeset viewer.