Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (15 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter.cpp

    r82 r88  
    1414
    1515
     16#undef  FUNCTION
     17#define FUNCTION "Shifter::Shifter"
    1618  Shifter::Shifter (
    1719#ifdef SYSTEMC
     
    2931    ,_usage (usage)
    3032  {
    31 #ifdef SYSTEMC
     33
     34#if DEBUG_Shifter == true
     35    log_printf(INFO,Shifter,FUNCTION,_("<%s> Parameters"),_name.c_str());
     36
     37    std::cout << *param << std::endl;
     38#endif   
     39
    3240    allocation ();
    33 #endif
    3441
    3542#ifdef STATISTICS
    36     // Allocation of statistics
    37     statistics_declaration(param_statistics);
     43    if (usage_is_set(_usage,USE_STATISTICS))
     44      {
     45        // Allocation of statistics
     46        statistics_declaration(param_statistics);
     47      }
    3848#endif
    3949
    4050#ifdef VHDL
    41     // generate the vhdl
    42     vhdl();
     51    if (usage_is_set(_usage,USE_VHDL))
     52      {
     53        // generate the vhdl
     54        vhdl();
     55      }
    4356#endif
    4457
    4558#ifdef SYSTEMC
     59    if (usage_is_set(_usage,USE_SYSTEMC))
     60      {
    4661#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
    4762    SC_METHOD (transition);
     
    91106      }
    92107#endif   
    93 
     108      }
    94109#endif
    95110  };
    96111 
     112#undef  FUNCTION
     113#define FUNCTION "Shifter::~Shifter"
    97114  Shifter::~Shifter (void)
    98115  {
    99 #ifdef SYSTEMC
    100     deallocation ();
     116#ifdef STATISTICS
     117    if (usage_is_set(_usage,USE_STATISTICS))
     118      delete _stat;
    101119#endif
    102120
    103 #ifdef STATISTICS
    104     delete _stat;
    105 #endif
     121    deallocation ();
    106122  };
    107123
Note: See TracChangeset for help on using the changeset viewer.