summaryrefslogtreecommitdiff
path: root/isa/isa.h
diff options
context:
space:
mode:
Diffstat (limited to 'isa/isa.h')
-rw-r--r--isa/isa.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/isa/isa.h b/isa/isa.h
index bea484e..24ed108 100644
--- a/isa/isa.h
+++ b/isa/isa.h
@@ -8,14 +8,23 @@ enum ctlreg {
8 DATA_INSTRUCTION_FIELD_SAVED, // (df_saved << 3) | if_saved 8 DATA_INSTRUCTION_FIELD_SAVED, // (df_saved << 3) | if_saved
9 HALTED, 9 HALTED,
10 INT_ENABLE, // (int_enable_delay << 1) | int_enable 10 INT_ENABLE, // (int_enable_delay << 1) | int_enable
11 TT_INPUT, // (tti_flag << 8) | tti_buffer 11 TT_BITS, // see below TT[IO]_* consts
12 TT_INPUT_INT_ENABLE, 12 TT_INPUT_INT_ENABLE,
13 TT_OUTPUT, // {tto_flag_old, tto_flag, tto_tx, tto_data}
14 TT_OUTPUT_INT_ENABLE, 13 TT_OUTPUT_INT_ENABLE,
15 14
16 NUM_CTLREGS, 15 NUM_CTLREGS,
17}; 16};
18 17
18// TT_BITS
19static constexpr unsigned int TTI_FLAG = 1 << 0;
20static constexpr unsigned int TTO_TX = 1 << 1;
21static constexpr unsigned int TTO_FLAG = 1 << 2;
22static constexpr unsigned int TTO_FLAG_OLD = 1 << 3;
23static constexpr unsigned int TTI_DATA_SHIFT = 8;
24static constexpr unsigned int TTO_DATA_SHIFT = 16;
25static constexpr unsigned int TTI_DATA = 0xff << TTI_DATA_SHIFT;
26static constexpr unsigned int TTO_DATA = 0xff << TTO_DATA_SHIFT;
27
19struct instruction_context { 28struct instruction_context {
20 // Known statically at decode time 29 // Known statically at decode time
21 bool need_indirect_load = false; // final_address = mem[init_address] 30 bool need_indirect_load = false; // final_address = mem[init_address]