source: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Types.h @ 73

Last change on this file since 73 was 73, checked in by rosiere, 16 years ago

add two component :

  • Write Queue (in Moore version)
  • Execute Queue

add macro to help the interface allocation : Allocation.h

File size: 2.2 KB
Line 
1#ifndef morpheo_behavioural_Types_h
2#define morpheo_behavioural_Types_h
3
4#include "Common/include/Types.h"
5#include "Behavioural/include/Constants.h"
6
7namespace morpheo {
8namespace behavioural {
9 
10  //============================================
11  // Type definition
12  //============================================
13
14  // ***** general
15  typedef bool          Tcontrol_t;
16  typedef uint32_t      Toperation_t;
17//typedef uint32_t      Tdestination1_t;
18//typedef uint32_t      Tdestination2_t;
19//typedef uint32_t      Texec_flag_t;
20//typedef bool          Texec_excep_t;
21//typedef uint32_t      Tcondition_t;
22//typedef uint32_t      Tbranch_state_t;
23
24  typedef uint32_t      Texception_t;
25  typedef uint32_t      Tcontext_t;
26  typedef uint32_t      Tpacket_t;
27  typedef uint32_t      Ttype_t;
28
29  // ***** Register
30  typedef uint32_t      Tgeneral_address_t;
31  typedef uint32_t      Tgeneral_data_t;
32  typedef uint32_t      Tspecial_address_t;
33  typedef uint32_t      Tspecial_data_t;
34
35  // ***** component dependant
36  // ~~~~~ load store queue
37  typedef uint32_t      Taccess_t;
38  typedef uint32_t      Tlsq_ptr_t;
39  typedef uint32_t      Tdcache_address_t;
40  typedef uint32_t      Tdcache_data_t;
41  typedef bool          Tdcache_error_t;
42  typedef uint32_t      Tdcache_type_t;
43
44  //----------------------------------------------[ spr_mode_access ]-----
45  class spr_access_mode_t
46  {
47  public : uint8_t _user_access_mode      ;
48  public : uint8_t _supervisor_access_mode;
49   
50  public : spr_access_mode_t (uint32_t user_access_mode       = SPR_ACCESS_MODE_NONE,
51                              uint32_t supervisor_access_mode = SPR_ACCESS_MODE_NONE)
52    {
53      _user_access_mode       = user_access_mode      ;
54      _supervisor_access_mode = supervisor_access_mode;
55    }
56  };
57
58  inline Tcontext_t get_num_thread (Tcontext_t num_context_id ,
59                                    uint32_t   size_context_id,
60                                    Tcontext_t num_front_end_id ,
61                                    uint32_t   size_front_end_id,
62                                    Tcontext_t num_ooo_engine_id ,
63                                    uint32_t   size_ooo_engine_id)
64  {
65    return ((num_ooo_engine_id << (size_context_id + size_front_end_id)) |
66            (num_front_end_id  << (size_context_id)) |
67            (num_context_id));
68  }
69                                   
70
71
72}; // end namespace behavioural
73}; // end namespace morpheo             
74
75#endif
Note: See TracBrowser for help on using the repository browser.