source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h @ 145

Last change on this file since 145 was 145, checked in by rosiere, 14 years ago

1) add test with SPECINT2K
2) new config of Selftest
3) modif RAT to support multiple depth_save ... but not finish (need fix Update Prediction Table)
4) add Function_pointer but need fix

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1#ifndef morpheo_behavioural_generic_registerfile_registerfile_multi_banked_Type_h
2#define morpheo_behavioural_generic_registerfile_registerfile_multi_banked_Type_h
3
4/*
5 * $Id: Types.h 145 2010-10-13 18:15:51Z rosiere $
6 *
7 * [ Description ]
8 *
9 */
10
11#include "Behavioural/include/Types.h"
12#include "Common/include/ToString.h"
13#include "Common/include/FromString.h"
14namespace morpheo                    {
15namespace behavioural {
16namespace generic {
17namespace registerfile {
18namespace registerfile_multi_banked {
19
20//typedef uint32_t Taddress_t;
21//typedef uint64_t Tdata_t;
22  typedef Tgeneral_data_t Tdata_t;
23
24}; // end namespace registerfile_multi_banked
25}; // end namespace registerfile
26}; // end namespace generic
27}; // end namespace behavioural
28
29  typedef enum {PARTIAL_CROSSBAR,
30                FULL_CROSSBAR   } Tcrossbar_t;
31
32  template<> inline Tcrossbar_t fromString<Tcrossbar_t> (const std::string& x)
33  {
34    if ( (x.compare("0")                == 0) or
35         (x.compare("PARTIAL_CROSSBAR") == 0))
36      return PARTIAL_CROSSBAR;
37    if ( (x.compare("1")                == 0) or
38         (x.compare("FULL_CROSSBAR"   ) == 0))
39      return FULL_CROSSBAR;
40
41    throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\""));
42  };
43 
44  template<> inline std::string toString<Tcrossbar_t>   (const Tcrossbar_t& x)
45  {
46    std::ostringstream out;
47
48    if (x == PARTIAL_CROSSBAR)
49      out << "PARTIAL_CROSSBAR";
50    if (x == FULL_CROSSBAR)
51      out << "FULL_CROSSBAR";
52
53    return out.str();
54  };
55
56
57}; // end namespace morpheo             
58
59#endif
Note: See TracBrowser for help on using the repository browser.