source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Parameters_print.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:keywords set to Id
File size: 2.8 KB
Line 
1/*
2 * $Id: Parameters_print.cpp 88 2008-12-10 18:31:39Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Parameters.h"
9#include "Behavioural/include/XML.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace context_state {
17
18
19#undef  FUNCTION
20#define FUNCTION "Context_State::print"
21  std::string Parameters::print (uint32_t depth)
22  {
23    log_begin(Context_State,FUNCTION);
24
25    XML xml ("context_state");
26
27    xml.balise_open("context_state");
28    xml.singleton_begin("nb_context                   "); xml.attribut("value",toString(_nb_context                   )); xml.singleton_end();
29//  xml.singleton_begin("nb_decod_unit                "); xml.attribut("value",toString(_nb_decod_unit                )); xml.singleton_end();
30    xml.singleton_begin("nb_inst_branch_complete      "); xml.attribut("value",toString(_nb_inst_branch_complete      )); xml.singleton_end();
31//  xml.singleton_begin("size_address                 "); xml.attribut("value",toString(_size_address                 )); xml.singleton_end();
32//  xml.singleton_begin("size_inst_commit             "); xml.attribut("value",toString(_size_inst_commit             )); xml.singleton_end();
33
34    for (uint32_t i=0;i<_nb_context; i++)
35      {
36        xml. balise_open_begin("component");
37        xml.  attribut("type","context");
38        xml.  attribut("id"  ,toString(i));
39        xml. balise_open_end();
40//         xml.  singleton_begin("size_depth                   "); xml.attribut("value",toString(_size_depth                    [i])); xml.singleton_end();
41        xml.  singleton_begin("link_context_to_decod_unit   "); xml.attribut("value",toString(_link_context_to_decod_unit    [i])); xml.singleton_end();
42        xml. balise_close();
43      }
44
45    for (uint32_t i=0;i<_nb_decod_unit; i++)
46      {
47        xml. balise_open_begin("component");
48        xml.  attribut("type","decod_unit");
49        xml.  attribut("id"  ,toString(i));
50        xml. balise_open_end();
51//      xml.  singleton_begin("size_inst_decod              "); xml.attribut("value",toString(_size_inst_decod              [i])); xml.singleton_end();
52        xml. balise_close();
53      }
54   
55    xml.balise_close();
56
57    log_end(Context_State,FUNCTION);
58   
59    return xml.get_body(depth);
60  };
61
62#undef  FUNCTION
63#define FUNCTION "Context_State::operator<<"
64  std::ostream& operator<< (std::ostream& output_stream ,
65                            morpheo::behavioural::core::multi_front_end::front_end::context_state::Parameters & x)
66  {
67    log_begin(Context_State,FUNCTION);
68
69    output_stream << x.print(0);
70   
71    log_end(Context_State,FUNCTION);
72
73    return output_stream;
74  };
75
76}; // end namespace context_state
77}; // end namespace front_end
78}; // end namespace multi_front_end
79}; // end namespace core
80
81}; // end namespace behavioural
82}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.