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

Last change on this file 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
Line 
1#ifdef STATISTICS
2#include "Behavioural/include/Stat.h"
3#include "Common/include/Environment.h"
4#include "Common/include/Systemc.h"
5
6namespace morpheo {
7namespace behavioural { 
8
9  void Stat::generate_file (void)
10  {
11    directory();
12    environment();
13
14    std::string body = print(1);
15
16    cycle_t _cycle_sum = simulation_cycle();
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));
25    xml->attribut("morpheo_version",MORPHEO_VERSION);
26    xml->balise_open_end();
27
28    xml->text (body);
29
30    xml->balise_close();
31
32    xml->filename_extension ("stat");
33    xml->generate_file(MORPHEO_STATISTICS);
34
35    delete xml;
36  }
37}; 
38};
39#endif
Note: See TracBrowser for help on using the repository browser.