corrections, clash fetch_action and self.fetch_action
[rv32.git] / cpudefs.py
1 """
2 /*
3 * Copyright 2018 Jacob Lifshay
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 *
23 */
24 """
25
26 fetch_action = 3
27
28 fetch_action_default = 0x0
29 fetch_action_fence = 0x1
30 fetch_action_jump = 0x2
31 fetch_action_wait = 0x3
32 fetch_action_error_trap = 0x4
33 fetch_action_noerror_trap = 0x5
34 fetch_action_ack_trap = 0x6
35
36 fetch_output_state = 2
37
38 fetch_output_state_empty = 0x0
39 fetch_output_state_valid = 0x1
40 fetch_output_state_trap = 0x2
41
42 decode_action = 12
43
44 decode_action_trap_illegal_instruction = 0x1
45 decode_action_load = 0x2
46 decode_action_fence = 0x4
47 decode_action_fence_i = 0x8
48 decode_action_op_op_imm = 0x10
49 decode_action_lui_auipc = 0x20
50 decode_action_store = 0x40
51 decode_action_branch = 0x80
52 decode_action_jalr = 0x100
53 decode_action_jal = 0x200
54 decode_action_trap_ecall_ebreak = 0x400
55 decode_action_csr = 0x800
56