Ignore:
Timestamp:
Jan 31, 2008, 6:46:41 PM (16 years ago)
Author:
rosiere
Message:

Update all component (except front_end) to :

  • new statistics model
  • no namespace std
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h

    r57 r75  
    1010
    1111#include "Behavioural/include/Types.h"
    12 
     12#include "Common/include/ToString.h"
     13#include "Common/include/FromString.h"
    1314namespace morpheo                    {
    1415namespace behavioural {
     
    2324}; // end namespace registerfile
    2425}; // end namespace generic
     26}; // end namespace behavioural
    2527
    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
    2756}; // end namespace morpheo             
    2857
Note: See TracChangeset for help on using the changeset viewer.