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

Last change on this file since 57 was 57, checked in by rosiere, 17 years ago
  • VHDL - RegisterFile_Multi_Banked (only partial_crossbar)
  • SystemC - modif Component, interface and co -> ajout du type Tusage_T pour instancier un coposant mais ne demander que le VHDL ou le systemC.
  • Séminaire interne
File size: 4.8 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  //----------------------------------------------------[ Operation ]-----
18// #define                 _nb_operation                 32
19// #define                 _size_operation               5
20
21#define                 _operation_none               0x0
22#define                 _operation_l_adds             0x1
23#define                 _operation_l_addu             0x2
24#define                 _operation_l_subs             0x3
25#define                 _operation_l_and              0x4
26#define                 _operation_l_or               0x5
27#define                 _operation_l_xor              0x6
28#define                 _operation_l_cmove            0x7
29#define                 _operation_l_read_imm         0x8
30#define                 _operation_l_movhi            0x9
31#define                 _operation_l_muls             0xa
32#define                 _operation_l_mulu             0xb
33#define                 _operation_l_divs             0xc
34#define                 _operation_l_divu             0xd
35#define                 _operation_l_exts             0xe
36#define                 _operation_l_extz             0xf
37#define                 _operation_l_ff1              0x10
38#define                 _operation_l_fl1              0x11
39#define                 _operation_l_sll              0x12
40#define                 _operation_l_sla              0x13
41#define                 _operation_l_srl              0x14
42#define                 _operation_l_ror              0x15
43#define                 _operation_l_cmp_eq           0x16
44#define                 _operation_l_cmp_ne           0x17
45#define                 _operation_l_cmp_ges          0x18
46#define                 _operation_l_cmp_geu          0x19
47#define                 _operation_l_cmp_gts          0x1a
48#define                 _operation_l_cmp_gtu          0x1b
49#define                 _operation_l_cmp_les          0x1c
50#define                 _operation_l_cmp_leu          0x1d
51#define                 _operation_l_cmp_lts          0x1e
52#define                 _operation_l_cmp_ltu          0x1f
53
54  //--------------------------------------------------[ destination ]-----
55#define                 _size_destination1            4
56
57#define                  cst_DESTINATION1_NONE        0x0
58#define                 mask_DESTINATION1_GPR         0x1
59#define                 mask_DESTINATION1_MEMORY      0x2
60#define                 mask_DESTINATION1_SPR         0x4
61#define                 mask_DESTINATION1_MAC_UNIT    0x8
62 
63#define                 _size_destination2  3
64
65#define                  cst_DESTINATION2_NONE        0x0
66#define                 mask_DESTINATION2_COMMIT      0x1
67#define                 mask_DESTINATION2_MEMORY      0x2
68#define                 mask_DESTINATION2_SPR         0x4
69 
70  //----------------------------------------------------[ exec_flag ]-----
71#define                 _size_exec_flag               2
72
73#define                 mask_EXEC_FLAG_NONE           0x1
74#define                 mask_EXEC_FLAG_CARRY          0x1
75#define                 mask_EXEC_FLAG_FLAG           0x1
76#define                 mask_EXEC_FLAG_OVERFLOW       0x2
77
78  //---------------------------------------------------[ exec_excep ]-----
79#define                  _size_exec_excep             1
80
81#define                 mask_EXEC_EXCEP_NONE          0x0
82#define                 mask_EXEC_EXCEP_RANGE         0x1
83 
84  //----------------------------------------------------[ Condition ]-----
85#define                 _size_condition               3
86   
87#define                  cst_CONDITION_UNCONDITIONAL  0x0           // None condition (jump)
88#define                 mask_CONDITION_CONDITIONAL    0x2           
89#define                 mask_CONDITION_CONDITIONAL_NF 0x0           // Branch if Flag is clear
90#define                 mask_CONDITION_CONDITIONAL_F  0x1           // Branch if Flag is set   
91#define                 mask_CONDITION_REG            0x4           // Branch if a register is read
92#define                 mask_CONDITION_STACK          0x8           // Branch with pop  in stack pointer
93
94  //-------------------------------------------------[ branch_state ]-----
95#define                 cst_BRANCH_STATE_NONE         0x0           // 0 0
96#define                 cst_BRANCH_STATE_NSPEC_TAKE   0x1           // 0 1  -> incondionnal
97#define                 cst_BRANCH_STATE_SPEC_NTAKE   0x2           // 1 0
98#define                 cst_BRANCH_STATE_SPEC_TAKE    0x3           // 1 1
99
100}; // end namespace constant
101}; // end namespace behavioural
102}; // end namespace morpheo             
103#endif
Note: See TracBrowser for help on using the repository browser.