Changeset 75 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h
- Timestamp:
- Jan 31, 2008, 6:46:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h
r57 r75 10 10 11 11 #include "Behavioural/include/Types.h" 12 12 #include "Common/include/ToString.h" 13 #include "Common/include/FromString.h" 13 14 namespace morpheo { 14 15 namespace behavioural { … … 23 24 }; // end namespace registerfile 24 25 }; // end namespace generic 26 }; // end namespace behavioural 25 27 26 }; // end namespace behavioural 28 typedef enum {PARTIAL_CROSSBAR, 29 FULL_CROSSBAR } Tcrossbar_t; 30 31 template<> inline Tcrossbar_t fromString<Tcrossbar_t> (const std::string& x) 32 { 33 if ( (x.compare("0") == 0) or 34 (x.compare("PARTIAL_CROSSBAR") == 0)) 35 return PARTIAL_CROSSBAR; 36 if ( (x.compare("1") == 0) or 37 (x.compare("FULL_CROSSBAR" ) == 0)) 38 return FULL_CROSSBAR; 39 40 throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\"")); 41 }; 42 43 template<> inline std::string toString<Tcrossbar_t> (const Tcrossbar_t& x) 44 { 45 std::ostringstream out; 46 47 if (x == PARTIAL_CROSSBAR) 48 out << "PARTIAL_CROSSBAR"; 49 if (x == FULL_CROSSBAR) 50 out << "FULL_CROSSBAR"; 51 52 return out.str(); 53 }; 54 55 27 56 }; // end namespace morpheo 28 57
Note: See TracChangeset
for help on using the changeset viewer.