Ignore:
Timestamp:
Feb 16, 2010, 1:35:48 PM (15 years ago)
Author:
rosiere
Message:

Various modif (add test, and vhdl)

Location:
trunk/IPs/systemC/processor/Morpheo/Common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Environment.h

    r113 r137  
    4848  extern std::string MORPHEO_HOME;
    4949  extern std::string MORPHEO_TOPLEVEL;
     50  extern std::string MORPHEO_VERSION;
     51  extern std::string MORPHEO_HEADER;
     52  extern std::string MORPHEO_DATE;
    5053 
    5154  void environment (void);
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Types.h

    r129 r137  
    4242#  define SC_OUT(type)             sc_out   <type >
    4343                                 
    44 #  define PORT_READ(sig)                                      sig->read()
    45 #  define PORT_WRITE(sig,val)      do {DEBUG_SIGNAL_ACCESS(sig); sig->write(val);} while(0)
     44#  define PORT_READ(sig)           sig->read()
     45#  define PORT_WRITE(sig,val)      do {DEBUG_SIGNAL_WRITE(sig); sig->write(val);} while(0)
    4646//#define INTERNAL_READ(sig)       (*sig)
    4747//#define INTERNAL_WRITE(sig,val)  (*sig) = val
  • trunk/IPs/systemC/processor/Morpheo/Common/src/Environment.cpp

    r97 r137  
    1717std::string MORPHEO_HOME;
    1818std::string MORPHEO_TOPLEVEL;
     19std::string MORPHEO_VERSION;
     20std::string MORPHEO_HEADER;
     21std::string MORPHEO_DATE;
    1922
    2023#undef  FUNCTION
     
    2528    {
    2629      {
    27         char * toplevel = getenv("MORPHEO_TOPLEVEL");
     30        char * TOPLEVEL = getenv("MORPHEO_TOPLEVEL");
    2831       
    29         if (toplevel == NULL)
     32        if (TOPLEVEL == NULL)
    3033          throw ERRORMORPHEO(FUNCTION,_("Error morpheo environment is not positioned.\n"));
    3134
    32         MORPHEO_TOPLEVEL = toplevel;
     35        MORPHEO_TOPLEVEL = TOPLEVEL;
    3336      }
    3437
    3538      {
    36         char * home = getenv("MORPHEO_HOME");
     39        char * HOME = getenv("MORPHEO_HOME");
    3740       
    38         if (home == NULL)
     41        if (HOME == NULL)
    3942          throw ERRORMORPHEO(FUNCTION,_("Error morpheo environment is not positioned.\n"));
    4043
    41         MORPHEO_HOME = home;
     44        MORPHEO_HOME = HOME;
     45      }
     46
     47      {
     48        char * MAJOR_VERSION = getenv("MORPHEO_MAJOR_VERSION");
     49        char * MINOR_VERSION = getenv("MORPHEO_MINOR_VERSION");
     50        char * REVISION      = getenv("MORPHEO_REVISION");
     51        char * CODENAME      = getenv("MORPHEO_CODENAME");
     52        char * DATE_DAY      = getenv("MORPHEO_DATE_DAY");
     53        char * DATE_MONTH    = getenv("MORPHEO_DATE_MONTH");
     54        char * DATE_YEAR     = getenv("MORPHEO_DATE_YEAR");
     55
     56        if ((MAJOR_VERSION == NULL) or
     57            (MINOR_VERSION == NULL) or
     58            (REVISION      == NULL) or
     59            (CODENAME      == NULL) or
     60            (DATE_DAY      == NULL) or
     61            (DATE_MONTH    == NULL) or
     62            (DATE_YEAR     == NULL))
     63          throw ERRORMORPHEO(FUNCTION,_("Error morpheo environment is not positioned.\n"));
     64
     65        MORPHEO_VERSION = toString(MAJOR_VERSION)+"."+toString(MINOR_VERSION)+"."+toString(REVISION);
     66        MORPHEO_HEADER  = MORPHEO_VERSION+" - "+toString(CODENAME);
     67        MORPHEO_DATE    = toString(DATE_YEAR)+"/"+toString(DATE_MONTH)+"/"+toString(DATE_DAY);
    4268      }
    4369
Note: See TracChangeset for help on using the changeset viewer.