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

Last change on this file since 55 was 55, checked in by rosiere, 17 years ago

Ajout SystemC read_queue et reservation_station
Ajout port au bloc registerfile_monolithic (à ajouter également au bloc registerfile et registerfile_multi_banked)
Modif param : passage de pointeur (attention, tous les composants n'ont pas été tous modifier)

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