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

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

1) Add test and configuration
2) Fix Bug
3) Add log file in load store unit
4) Fix Bug in environment

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1009 bytes
Line 
1#ifdef STATISTICS
2#include "Behavioural/include/Stat.h"
3#include "Behavioural/include/Version.h"
4#include "Common/include/Environment.h"
5#include "Common/include/Systemc.h"
6
7namespace morpheo {
8namespace behavioural { 
9
10  void Stat::generate_file (void)
11  {
12    directory();
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.