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