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

Last change on this file since 88 was 88, checked in by rosiere, 15 years ago

Almost complete design
with Test and test platform

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