[88] | 1 | #ifndef Morpheo_Type_h |
---|
| 2 | #define Morpheo_Type_h |
---|
[2] | 3 | |
---|
| 4 | /* |
---|
| 5 | * $Id: Types.h 129 2009-06-29 16:38:40Z rosiere $ |
---|
| 6 | * |
---|
| 7 | * [ Description ] |
---|
| 8 | * |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | #include <stdint.h> |
---|
[129] | 12 | #include "Behavioural/include/Debug_signal.h" |
---|
[2] | 13 | |
---|
| 14 | namespace morpheo { |
---|
| 15 | |
---|
| 16 | #ifdef SYSTEMC |
---|
| 17 | |
---|
| 18 | // Definition of type |
---|
[78] | 19 | //#if ( defined(SC_CLOCK) || defined(SC_INTERNAL) || defined(SC_SIGNAL) || defined(SC_REGISTER) || defined(SC_IN) || defined(SC_OUT) ) |
---|
| 20 | #if ( defined(SC_CLOCK) || defined(SC_IN) || defined(SC_OUT) ) |
---|
[2] | 21 | # error "A type is already defined" |
---|
| 22 | #endif |
---|
| 23 | |
---|
| 24 | #if ( defined(PORT_READ) || defined(PORT_WRITE) ) |
---|
| 25 | # error "Action is already defined" |
---|
| 26 | #endif |
---|
[78] | 27 | // #if ( defined(INTERNAL_READ) || defined(INTERNAL_WRITE) ) |
---|
| 28 | // # error "Action is already defined" |
---|
| 29 | // #endif |
---|
| 30 | // #if ( defined(SIGNAL_READ) || defined(SIGNAL_WRITE) ) |
---|
| 31 | // # error "Action is already defined" |
---|
| 32 | // #endif |
---|
| 33 | // #if ( defined(REGISTER_READ) || defined(REGISTER_WRITE) ) |
---|
| 34 | // # error "Action is already defined" |
---|
| 35 | // #endif |
---|
[2] | 36 | |
---|
[88] | 37 | # define SC_CLOCK sc_in_clk |
---|
| 38 | //#define SC_INTERNAL(type) type |
---|
| 39 | //#define SC_REGISTER(type) sc_signal<type > |
---|
| 40 | //#define SC_SIGNAL(type) sc_signal<type > |
---|
| 41 | # define SC_IN(type) sc_in <type > |
---|
| 42 | # define SC_OUT(type) sc_out <type > |
---|
[2] | 43 | |
---|
[129] | 44 | # define PORT_READ(sig) sig->read() |
---|
| 45 | # define PORT_WRITE(sig,val) do {DEBUG_SIGNAL_ACCESS(sig); sig->write(val);} while(0) |
---|
[88] | 46 | //#define INTERNAL_READ(sig) (*sig) |
---|
| 47 | //#define INTERNAL_WRITE(sig,val) (*sig) = val |
---|
| 48 | //#define SIGNAL_READ(sig) sig->read() |
---|
| 49 | //#define SIGNAL_WRITE(sig,val) sig->write(val) |
---|
| 50 | //#define REGISTER_READ(sig) sig->read() |
---|
| 51 | //#define REGISTER_WRITE(sig,val) sig->write(val) |
---|
[2] | 52 | |
---|
| 53 | #endif |
---|
| 54 | }; // end namespace morpheo |
---|
| 55 | |
---|
| 56 | #endif |
---|