1 | #ifndef Morpheo_Type_h |
---|
2 | #define Morpheo_Type_h |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id: Types.h 137 2010-02-16 12:35:48Z rosiere $ |
---|
6 | * |
---|
7 | * [ Description ] |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #include <stdint.h> |
---|
12 | #include "Behavioural/include/Debug_signal.h" |
---|
13 | |
---|
14 | namespace morpheo { |
---|
15 | |
---|
16 | #ifdef SYSTEMC |
---|
17 | |
---|
18 | // Definition of type |
---|
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) ) |
---|
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 |
---|
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 |
---|
36 | |
---|
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 > |
---|
43 | |
---|
44 | # define PORT_READ(sig) sig->read() |
---|
45 | # define PORT_WRITE(sig,val) do {DEBUG_SIGNAL_WRITE(sig); sig->write(val);} while(0) |
---|
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) |
---|
52 | |
---|
53 | #endif |
---|
54 | }; // end namespace morpheo |
---|
55 | |
---|
56 | #endif |
---|