Ignore:
Timestamp:
Jul 8, 2009, 8:40:08 PM (15 years ago)
Author:
rosiere
Message:

1) add constant method
2) test with systemc 2.2.0

File:
1 edited

Legend:

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

    r113 r131  
    3636
    3737#ifdef MTI_SYSTEMC
    38 # define simulation_run(x) do{ if (x>0) wait(TIME_PERIOD*x,TIME_UNIT); else for (int i=0; i<1000; ++i) wait(SC_ZERO_TIME); } while(0)
     38#  define simulation_run(x) do{ if (x>0) wait(TIME_PERIOD*x,TIME_UNIT); else for (int i=0; i<1000; ++i) wait(SC_ZERO_TIME); } while(0)
    3939#else
    40 # define simulation_run(x) do{ sc_start(x); } while(0)
     40# ifdef SYSTEMCASS_SPECIFIC
     41#  define simulation_run(x) do{ sc_time t (x,TIME_UNIT); sc_start(t); } while(0)
     42# else // systemc
     43#  define simulation_run(x) do{ if(x==0) {sc_start(SC_ZERO_TIME);} else {sc_time t (x,TIME_UNIT); sc_start(t);}} while(0)
     44# endif
    4145#endif
    4246
    4347#define simulation_cycle() sc_simulation_time()/TIME_PERIOD
    44 
     48// #define simulation_cycle() sc_time_stamp()/TIME_PERIOD
    4549};
    4650#endif
Note: See TracChangeset for help on using the changeset viewer.