source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_generate_file.cpp @ 146

Last change on this file since 146 was 137, checked in by rosiere, 14 years ago

Various modif (add test, and vhdl)

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 987 bytes
RevLine 
[71]1#ifdef STATISTICS
2#include "Behavioural/include/Stat.h"
[88]3#include "Common/include/Environment.h"
[113]4#include "Common/include/Systemc.h"
[71]5
6namespace morpheo {
7namespace behavioural { 
8
9  void Stat::generate_file (void)
10  {
[88]11    directory();
[137]12    environment();
[88]13
[71]14    std::string body = print(1);
15
[113]16    cycle_t _cycle_sum = simulation_cycle();
[71]17
18    morpheo::behavioural::XML * xml = new morpheo::behavioural::XML (_name_instance);
19
20    xml->balise_open_begin("statistics");
21    xml->attribut("nb_cycle_before_begin",toString(_nb_cycle_before_begin));
22    xml->attribut("period",toString(_period));
23    xml->attribut("nb_cycle_simulation",toString(_cycle_sum));
24    xml->attribut("nb_cycle_statistics",toString(_cycle_sum-_nb_cycle_before_begin));
[81]25    xml->attribut("morpheo_version",MORPHEO_VERSION);
[71]26    xml->balise_open_end();
27
28    xml->text (body);
29
30    xml->balise_close();
31
[124]32    xml->filename_extension ("stat");
[88]33    xml->generate_file(MORPHEO_STATISTICS);
[71]34
35    delete xml;
36  }
37}; 
38};
39#endif
Note: See TracBrowser for help on using the repository browser.