2023-02-22 01:58:08 +00:00
|
|
|
/* ucode_header.v - Labels and global information useful to modules interfacing with the microcode
|
|
|
|
|
|
|
|
This file is part of the 9086 project.
|
|
|
|
|
2024-02-10 15:52:13 +00:00
|
|
|
Copyright (c) 2024 Efthymios Kritikos
|
2023-02-22 01:58:08 +00:00
|
|
|
|
|
|
|
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/>. */
|
|
|
|
|
2023-03-08 07:26:28 +00:00
|
|
|
`define UCODE_SIZE 17
|
|
|
|
`define UCODE_DATA_BITS 40
|
2023-03-04 06:22:28 +00:00
|
|
|
`define UCODE_ADDR_BITS $clog2(`UCODE_SIZE)
|
2023-02-19 16:22:23 +00:00
|
|
|
|
2023-02-22 01:28:23 +00:00
|
|
|
/* DEFINE ADDRESSES IN THE MICROCODE */
|
2023-03-08 07:26:28 +00:00
|
|
|
`define UCODE_NO_INSTRUCTION 5'b00000
|
|
|
|
`define UCODE_CALL_ENTRY 5'b00001
|
|
|
|
`define UCODE_RET_ENTRY 5'b00100
|
|
|
|
`define UCODE_STOS_ENTRY 5'b00110
|
|
|
|
`define UCODE_PUSH_ENTRY 5'b01000
|
|
|
|
`define UCODE_POP_ENTRY 5'b01010
|
|
|
|
`define UCODE_INT_ENTRY 5'b01100
|