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

Last change on this file since 83 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1#ifndef morpheo_Type
2#define morpheo_Type
3
4/*
5 * $Id: Types.h 81 2008-04-15 18:40:01Z 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.