Line 74... |
Line 74... |
Default_Interrupt_Mask : DATA_TYPE := x"FF";
|
Default_Interrupt_Mask : DATA_TYPE := x"FF";
|
Reset_Level : std_logic := '0' );
|
Reset_Level : std_logic := '0' );
|
port(
|
port(
|
Clock : in std_logic;
|
Clock : in std_logic;
|
Reset : in std_logic;
|
Reset : in std_logic;
|
|
CPU_Halt : in std_logic;
|
Interrupts : in INTERRUPT_BUNDLE;
|
Interrupts : in INTERRUPT_BUNDLE;
|
Address : out ADDRESS_TYPE;
|
Address : out ADDRESS_TYPE;
|
Rd_Data : in DATA_TYPE;
|
Rd_Data : in DATA_TYPE;
|
Rd_Enable : out std_logic;
|
Rd_Enable : out std_logic;
|
Wr_Data : out DATA_TYPE;
|
Wr_Data : out DATA_TYPE;
|
Line 141... |
Line 142... |
constant SOP_GMSK : SUBOP_TYPE := "110";
|
constant SOP_GMSK : SUBOP_TYPE := "110";
|
constant SOP_JSR : SUBOP_TYPE := "111";
|
constant SOP_JSR : SUBOP_TYPE := "111";
|
|
|
type CPU_STATES is (
|
type CPU_STATES is (
|
-- Instruction fetch & Decode
|
-- Instruction fetch & Decode
|
PIPE_FILL_0, PIPE_FILL_1, PIPE_FILL_2, INSTR_DECODE,
|
IPF_C0, IPF_C1, IPF_C2, IDC_C0,
|
-- Branching
|
-- Branching
|
BRN_C1, DBNZ_C1, JMP_C1, JMP_C2,
|
BRN_C1, DBNZ_C1, JMP_C1, JMP_C2,
|
-- Loads
|
-- Loads
|
LDA_C1, LDA_C2, LDA_C3, LDA_C4, LDI_C1,
|
LDA_C1, LDA_C2, LDA_C3, LDA_C4, LDI_C1,
|
LDO_C1, LDX_C1, LDX_C2, LDX_C3, LDX_C4,
|
LDO_C1, LDX_C1, LDX_C2, LDX_C3, LDX_C4,
|
Line 154... |
Line 155... |
-- 2-cycle math
|
-- 2-cycle math
|
MUL_C1, UPP_C1,
|
MUL_C1, UPP_C1,
|
-- Stack
|
-- Stack
|
PSH_C1, POP_C1, POP_C2, POP_C3, POP_C4,
|
PSH_C1, POP_C1, POP_C2, POP_C3, POP_C4,
|
-- Subroutines & Interrupts
|
-- Subroutines & Interrupts
|
WAIT_FOR_INT,
|
WAI_Cx, WAH_Cx, BRK_C1,
|
ISR_C1, ISR_C2, ISR_C3, JSR_C1, JSR_C2,
|
ISR_C1, ISR_C2, ISR_C3, JSR_C1, JSR_C2,
|
RTS_C1, RTS_C2, RTS_C3, RTS_C4, RTS_C5, RTI_C6,
|
RTS_C1, RTS_C2, RTS_C3, RTS_C4, RTS_C5, RTI_C6
|
-- Debugging
|
);
|
BRK_C1 );
|
|
|
|
type CACHE_MODES is (CACHE_IDLE, CACHE_INSTR, CACHE_OPER1, CACHE_OPER2,
|
type CACHE_MODES is (CACHE_IDLE, CACHE_INSTR, CACHE_OPER1, CACHE_OPER2,
|
CACHE_PREFETCH );
|
CACHE_PREFETCH );
|
|
|
type PC_MODES is ( PC_INCR, PC_LOAD );
|
type PC_MODES is ( PC_INCR, PC_LOAD );
|