2023-02-13 16:49:17 +00:00
|
|
|
/* config.v - Configuration values for the 9086 CPU and the system around it
|
|
|
|
|
|
|
|
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/>. */
|
|
|
|
|
2023-05-10 03:05:56 +00:00
|
|
|
/** Runtime Verbosity **/
|
2023-02-15 03:53:05 +00:00
|
|
|
//`define DEBUG_REG_WRITES
|
|
|
|
//`define DEBUG_PC_ADDRESS
|
2023-05-10 03:05:56 +00:00
|
|
|
//`define DEBUG_DATA_READ_WRITES
|
|
|
|
|
2023-05-14 15:06:33 +00:00
|
|
|
/** OUTPUT **/
|
|
|
|
/* These are usually set at build time*/
|
|
|
|
//`define CALCULATE_IPC
|
|
|
|
//`define OTUPUT_JSON_STATISTICS
|
|
|
|
|
2023-05-10 03:05:56 +00:00
|
|
|
/** Optimisations **/
|
|
|
|
|
|
|
|
/* Enables the ability to check if an instruction in the input
|
|
|
|
* buffer is completed and mark it ready instead of always waiting
|
|
|
|
* for the maximum instruction size worth of bytes */
|
|
|
|
`define EARLY_VALID_INSTRUCTION
|
|
|
|
|
2023-11-04 11:04:22 +00:00
|
|
|
/*********** CURRENTLY DOESN'T WORK *************/
|
2023-05-16 17:07:28 +00:00
|
|
|
/* Enables the ability in BIU to pre-decode two instructions, one after the other in memory*/
|
2023-11-04 11:04:22 +00:00
|
|
|
//`define DOUBLE_INSTRUCTION_LOAD
|
|
|
|
/************************************************/
|
2023-05-16 17:07:28 +00:00
|
|
|
|
2023-05-11 15:28:10 +00:00
|
|
|
/* Size is in powers of two with minimal 3.
|
|
|
|
* 3 : 8 Bytes
|
|
|
|
* 4 : 16 Bytes
|
|
|
|
* 5 : 32 Bytes
|
|
|
|
* . : ... */
|
2023-05-18 10:21:27 +00:00
|
|
|
`define L1_CACHE_SIZE 4
|
2023-05-10 03:05:56 +00:00
|
|
|
|
2023-11-06 08:12:58 +00:00
|
|
|
//// These are usually set at build time
|
|
|
|
//
|
|
|
|
// /* This is the "virtual" synthesised ram, so for example on an FPGA
|
|
|
|
// * This would be made inside the fabric of the fpga. */
|
|
|
|
// `define BUILTIN_RAM 512
|
|
|
|
// ////// ATTENTION: PLEASE IF BUILTIN_RAM DOESN'T COVER THE ENTIRE (CURRENTLY)
|
|
|
|
// // 16 BIT RANGE, I.E. ISN'T 32768, PLEASE SET THE FOLLOWING FLAG
|
|
|
|
// `define NOT_FULL
|
2023-05-10 03:05:56 +00:00
|
|
|
|
2023-05-11 15:28:10 +00:00
|
|
|
|
|
|
|
/********** Internal **********/
|
2023-11-02 22:19:15 +00:00
|
|
|
`ifdef SYNTHESIS
|
|
|
|
`undef DEBUG_REG_WRITES
|
|
|
|
`undef DEBUG_PC_ADDRESS
|
|
|
|
`undef DEBUG_DATA_READ_WRITES
|
|
|
|
`undef CALCULATE_IPC
|
|
|
|
`undef OTUPUT_JSON_STATISTICS
|
|
|
|
`endif
|
2023-05-16 17:07:28 +00:00
|
|
|
|
|
|
|
`ifdef OTUPUT_JSON_STATISTICS
|
|
|
|
`define CALCULATE_IPC
|
|
|
|
`endif
|
|
|
|
|
|
|
|
`ifdef DOUBLE_INSTRUCTION_LOAD
|
|
|
|
/*Needed for DOUBLE_INSTRUCTION_LOAD*/
|
|
|
|
`define EARLY_VALID_INSTRUCTION
|
|
|
|
`endif
|
|
|
|
|
2023-05-10 03:05:56 +00:00
|
|
|
`ifdef EARLY_VALID_INSTRUCTION
|
2023-05-16 17:07:28 +00:00
|
|
|
`define INCLUDE_EARLY_CALC_CIRUIT
|
2023-05-10 03:05:56 +00:00
|
|
|
`define EARLY_VALID_INSTRUCTION_ 1
|
|
|
|
`else
|
|
|
|
`define EARLY_VALID_INSTRUCTION_ 0
|
|
|
|
`endif
|
2023-05-14 15:06:33 +00:00
|
|
|
|
2023-05-16 17:07:28 +00:00
|
|
|
`ifdef CALCULATE_IPC
|
|
|
|
`define INCLUDE_EARLY_CALC_CIRUIT
|
2023-05-14 15:06:33 +00:00
|
|
|
`endif
|