source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Constant/Constant_OpenRISC.h @ 53

Last change on this file since 53 was 53, checked in by rosiere, 17 years ago
  • Banc de registre multi banc
  • Banc de registre générique.
File size: 5.1 KB
Line 
1#ifndef morpheo_behavioural_constant_Constant_h
2
3/*
4 * $Id$
5 *
6 * [ Description ]
7 *
8 */
9
10using namespace std;
11
12namespace morpheo {
13namespace behavioural {
14namespace constant {
15#define                 _size_instruction             32
16#define                 _size_instruction_log2        5
17
18  //------------------------------------------------------[ Control ]-----
19  typedef bool          Tcontrol_t;
20
21  //----------------------------------------------------[ Operation ]-----
22  typedef uint8_t       Toperation_t;
23// #define                 _nb_operation                 32
24// #define                 _size_operation               5
25
26#define                 _operation_none               0x0
27#define                 _operation_l_adds             0x1
28#define                 _operation_l_addu             0x2
29#define                 _operation_l_subs             0x3
30#define                 _operation_l_and              0x4
31#define                 _operation_l_or               0x5
32#define                 _operation_l_xor              0x6
33#define                 _operation_l_cmove            0x7
34#define                 _operation_l_read_imm         0x8
35#define                 _operation_l_movhi            0x9
36#define                 _operation_l_muls             0xa
37#define                 _operation_l_mulu             0xb
38#define                 _operation_l_divs             0xc
39#define                 _operation_l_divu             0xd
40#define                 _operation_l_exts             0xe
41#define                 _operation_l_extz             0xf
42#define                 _operation_l_ff1              0x10
43#define                 _operation_l_fl1              0x11
44#define                 _operation_l_sll              0x12
45#define                 _operation_l_sla              0x13
46#define                 _operation_l_srl              0x14
47#define                 _operation_l_ror              0x15
48#define                 _operation_l_cmp_eq           0x16
49#define                 _operation_l_cmp_ne           0x17
50#define                 _operation_l_cmp_ges          0x18
51#define                 _operation_l_cmp_geu          0x19
52#define                 _operation_l_cmp_gts          0x1a
53#define                 _operation_l_cmp_gtu          0x1b
54#define                 _operation_l_cmp_les          0x1c
55#define                 _operation_l_cmp_leu          0x1d
56#define                 _operation_l_cmp_lts          0x1e
57#define                 _operation_l_cmp_ltu          0x1f
58
59  //--------------------------------------------------[ destination ]-----
60  typedef uint8_t       Tdestination1_t;
61#define                 _size_destination1            4
62
63#define                  cst_DESTINATION1_NONE        0x0
64#define                 mask_DESTINATION1_GPR         0x1
65#define                 mask_DESTINATION1_MEMORY      0x2
66#define                 mask_DESTINATION1_SPR         0x4
67#define                 mask_DESTINATION1_MAC_UNIT    0x8
68 
69  typedef uint8_t       Tdestination2_t;
70#define                 _size_destination2  3
71
72#define                  cst_DESTINATION2_NONE        0x0
73#define                 mask_DESTINATION2_COMMIT      0x1
74#define                 mask_DESTINATION2_MEMORY      0x2
75#define                 mask_DESTINATION2_SPR         0x4
76 
77  //----------------------------------------------------[ exec_flag ]-----
78  typedef uint8_t       Texec_flag_t;
79#define                 _size_exec_flag               2
80
81#define                 mask_EXEC_FLAG_NONE           0x1
82#define                 mask_EXEC_FLAG_CARRY          0x1
83#define                 mask_EXEC_FLAG_FLAG           0x1
84#define                 mask_EXEC_FLAG_OVERFLOW       0x2
85
86  //---------------------------------------------------[ exec_excep ]-----
87  typedef bool          Texec_excep_t;
88#define                  _size_exec_excep             1
89
90#define                 mask_EXEC_EXCEP_NONE          0x0
91#define                 mask_EXEC_EXCEP_RANGE         0x1
92 
93  //----------------------------------------------------[ Condition ]-----
94  typedef uint8_t       Tcondition_t;
95#define                 _size_condition               3
96   
97#define                  cst_CONDITION_UNCONDITIONAL  0x0           // None condition (jump)
98#define                 mask_CONDITION_CONDITIONAL    0x2           
99#define                 mask_CONDITION_CONDITIONAL_NF 0x0           // Branch if Flag is clear
100#define                 mask_CONDITION_CONDITIONAL_F  0x1           // Branch if Flag is set   
101#define                 mask_CONDITION_REG            0x4           // Branch if a register is read
102#define                 mask_CONDITION_STACK          0x8           // Branch with pop  in stack pointer
103
104  //-------------------------------------------------[ branch_state ]-----
105  typedef uint8_t       Tbranch_state_t;
106
107#define                 cst_BRANCH_STATE_NONE         0x0           // 0 0
108#define                 cst_BRANCH_STATE_NSPEC_TAKE   0x1           // 0 1  -> incondionnal
109#define                 cst_BRANCH_STATE_SPEC_NTAKE   0x2           // 1 0
110#define                 cst_BRANCH_STATE_SPEC_TAKE    0x3           // 1 1
111
112}; // end namespace constant
113}; // end namespace behavioural
114}; // end namespace morpheo             
115
116#endif
Note: See TracBrowser for help on using the repository browser.