source: trunk/IPs/systemC/processor/Morpheo/Common/include/Types.h @ 88

Last change on this file since 88 was 88, checked in by rosiere, 15 years ago

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1#ifndef Morpheo_Type_h
2#define Morpheo_Type_h
3
4/*
5 * $Id: Types.h 88 2008-12-10 18:31:39Z rosiere $
6 *
7 * [ Description ]
8 *
9 */
10
11#include <stdint.h>
12
13namespace morpheo              {
14
15#ifdef SYSTEMC
16
17// Definition of type
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) )
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
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
35
36#  define SC_CLOCK                 sc_in_clk       
37//#define SC_INTERNAL(type)        type
38//#define SC_REGISTER(type)        sc_signal<type >
39//#define SC_SIGNAL(type)          sc_signal<type >
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)
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)
51
52#endif 
53}; // end namespace morpheo             
54
55#endif
Note: See TracBrowser for help on using the repository browser.