source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/include/Parameters.h @ 23

Last change on this file since 23 was 23, checked in by rosiere, 17 years ago

Documentation pour chaque composant.
Documentation : ajout d'un poster et d'un article.
RegisterFile_Multi_Banked_Glue - non encore stable.

File size: 3.2 KB
Line 
1#ifndef morpheo_behavioural_generic_registerfile_registerfile_multi_banked_registerfile_multi_banked_glue_Parameters_h
2#define morpheo_behavioural_generic_registerfile_registerfile_multi_banked_registerfile_multi_banked_glue_Parameters_h
3
4/*
5 * $Id$
6 *
7 * [ Description ]
8 *
9 */
10
11#include "Include/Debug.h"
12#include "Include/FromString.h"
13#include "Behavioural/include/Parameters.h"
14#include <math.h>
15
16namespace morpheo {
17
18  typedef enum {PARTIAL_CROSSBAR,
19                FULL_CROSSBAR   } Tcrossbar_t;
20
21  template<> inline Tcrossbar_t fromString<Tcrossbar_t> (const std::string& x)
22  {
23    if ( (x.compare("0")                == 0) or
24         (x.compare("PARTIAL_CROSSBAR") == 0))
25      return PARTIAL_CROSSBAR;
26    if ( (x.compare("1")                == 0) or
27         (x.compare("FULL_CROSSBAR"   ) == 0))
28      return FULL_CROSSBAR;
29
30    throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\""));
31  }
32 
33  template<> inline std::string toString<Tcrossbar_t>   (const Tcrossbar_t& x)
34  {
35    ostringstream out;
36
37    if (x == PARTIAL_CROSSBAR)
38      out << "PARTIAL_CROSSBAR";
39    if (x == FULL_CROSSBAR)
40      out << "FULL_CROSSBAR";
41
42    return out.str();
43  }
44
45namespace behavioural {
46namespace generic {
47namespace registerfile{
48namespace registerfile_multi_banked {
49namespace registerfile_multi_banked_glue {
50     
51  class Parameters : public morpheo::behavioural::Parameters
52  {
53    //-----[ fields ]------------------------------------------------------------
54  public : const uint32_t    _nb_port_read         ;
55  public : const uint32_t    _nb_port_write        ;
56  public : const uint32_t    _size_address         ;
57  public : const uint32_t    _size_word            ;
58  public : const uint32_t    _nb_bank              ;
59  public : const uint32_t    _nb_port_read_by_bank ;
60  public : const uint32_t    _nb_port_write_by_bank;
61  public : const Tcrossbar_t _crossbar             ;
62
63  public : const uint32_t    _shift_address        ;
64
65    // A lot of table to the partial crossbar
66  public :       uint32_t  * _link_port_read_in_to_out    ;
67  public :       uint32_t  * _link_port_read_in_to_select ;
68  public :       uint32_t  * _link_port_write_in_to_out   ;
69  public :       uint32_t  * _link_port_write_in_to_select;
70
71    //-----[ methods ]-----------------------------------------------------------
72  public : Parameters  (uint32_t    nb_port_read         ,
73                        uint32_t    nb_port_write        ,
74                        uint32_t    size_address         ,
75                        uint32_t    size_word            ,
76                        uint32_t    nb_bank              ,
77                        uint32_t    nb_port_read_by_bank ,
78                        uint32_t    nb_port_write_by_bank,
79                        Tcrossbar_t crossbar             );
80
81  public : Parameters  (Parameters & param) ;
82  public : ~Parameters () ;
83
84  public : string msg_error           (void);
85
86  public :        string   print      (uint32_t depth);
87  public : friend ostream& operator<< (ostream& output_stream,
88                                       morpheo::behavioural::generic::registerfile::registerfile_multi_banked::registerfile_multi_banked_glue::Parameters & x);
89  };
90
91}; // end namespace registerfile_multi_banked_glue
92}; // end namespace registerfile_multi_banked
93}; // end namespace registerfile
94}; // end namespace generic
95
96}; // end namespace behavioural
97}; // end namespace morpheo             
98
99#endif
Note: See TracBrowser for help on using the repository browser.