Changeset 75 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.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/Parameters.h
r62 r75 10 10 11 11 #include "Common/include/Debug.h" 12 #include "Common/include/FromString.h"13 12 #include "Behavioural/include/Parameters.h" 14 13 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h" … … 16 15 17 16 namespace morpheo { 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) or24 (x.compare("PARTIAL_CROSSBAR") == 0))25 return PARTIAL_CROSSBAR;26 if ( (x.compare("1") == 0) or27 (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 45 17 namespace behavioural { 46 18 namespace generic { … … 92 64 public : ~Parameters () ; 93 65 94 public : string msg_error (void); 95 96 public : string print (uint32_t depth); 97 public : friend ostream& operator<< (ostream& output_stream, 98 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x); 66 public : std::string msg_error (void); 67 public : std::string print (uint32_t depth); 68 public : friend std::ostream& operator<< (std::ostream& output_stream, 69 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x); 99 70 }; 100 71
Note: See TracChangeset
for help on using the changeset viewer.