47 lines
1.3 KiB
Verilog
47 lines
1.3 KiB
Verilog
/* proc_state_def.v - Definitions of the states in the main state machine
|
|
of the 9086 CPU.
|
|
|
|
This file is part of the 9086 project.
|
|
|
|
Copyright (c) 2023 Efthymios Kritikos
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
`define PROC_STATE_BITS 4
|
|
|
|
|
|
`define PROC_HALT_STATE 4'b0000
|
|
|
|
/*DECODE SATE*/
|
|
`define PROC_DE_STATE_ENTRY 4'b0001
|
|
`define PROC_DE_LOAD_16_PARAM 4'b0010
|
|
`define PROC_DE_LOAD_REG_TO_PARAM 4'b0011
|
|
`define PROC_DE_LOAD_8_PARAM 4'b0100
|
|
|
|
/*MEM/IO READ*/
|
|
`define PROC_MEMIO_READ 4'b0101
|
|
`define PROC_MEMIO_READ_SETADDR 4'b0110
|
|
|
|
/*EXECUTE STATE*/
|
|
`define PROC_EX_STATE_ENTRY 4'b1000
|
|
|
|
/*MEM/IO WRITE*/
|
|
`define PROC_MEMIO_WRITE 4'b0111
|
|
|
|
`define PROC_NEXT_INSTRUCTION 4'b1001
|
|
|
|
`define PROC_NEXT_MICROCODE 4'b1010
|
|
|
|
`define PROC_RESET 4'b1011
|