mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-02 09:45:18 +00:00
Change all SUPPORTED type localparamters to one bit logic. Update configs for consistency.
This commit is contained in:
parent
1065b8977a
commit
bf397f791f
1
.gitignore
vendored
1
.gitignore
vendored
@ -211,6 +211,7 @@ sim/vcs/sim_out*
|
||||
sim/vcs/simprofile_dir
|
||||
sim/vcs/ucli.key
|
||||
sim/vcs/verdi_config_file
|
||||
sim/vcs/vcdplus.vpd
|
||||
sim/*/testbench.vcd
|
||||
sim/questa/imperas.log
|
||||
sim/questa/functcov.log
|
||||
|
@ -2,10 +2,10 @@
|
||||
// config.vh
|
||||
//
|
||||
// Written: David_Harris@hmc.edu 4 January 2021
|
||||
// Modified:
|
||||
// Modified: Jordan Carlin jcarlin@hmc.edu 14 May 2024
|
||||
//
|
||||
// Purpose: Specify which features are configured
|
||||
// Macros to determine which modes are supported based on MISA
|
||||
// Purpose: Specify which features of Wally are enabled and set
|
||||
// configuration parameters
|
||||
//
|
||||
// A component of the Wally configurable RISC-V project.
|
||||
//
|
||||
@ -35,85 +35,85 @@ localparam IEEE754 = 0;
|
||||
|
||||
// RISC-V configuration per specification
|
||||
// Base instruction set (defaults to I if E is not supported)
|
||||
localparam E_SUPPORTED = 1;
|
||||
localparam logic E_SUPPORTED = 1;
|
||||
|
||||
// Integer instruction set extensions
|
||||
localparam ZIFENCEI_SUPPORTED = 0; // Instruction-Fetch fence
|
||||
localparam ZICSR_SUPPORTED = 0; // CSR Instructions
|
||||
localparam ZICCLSM_SUPPORTED = 0; // Misaligned loads/stores
|
||||
localparam ZICOND_SUPPORTED = 0; // Integer conditional operations
|
||||
localparam logic ZIFENCEI_SUPPORTED = 0; // Instruction-Fetch fence
|
||||
localparam logic ZICSR_SUPPORTED = 0; // CSR Instructions
|
||||
localparam logic ZICCLSM_SUPPORTED = 0; // Misaligned loads/stores
|
||||
localparam logic ZICOND_SUPPORTED = 0; // Integer conditional operations
|
||||
|
||||
// Multiplication & division extensions
|
||||
localparam M_SUPPORTED = 0;
|
||||
localparam ZMMUL_SUPPORTED= 0;
|
||||
localparam logic M_SUPPORTED = 0;
|
||||
localparam logic ZMMUL_SUPPORTED = 0;
|
||||
|
||||
// Atomic extensions
|
||||
// A extension is Zaamo + Zalrsc
|
||||
localparam ZAAMO_SUPPORTED = 0;
|
||||
localparam ZALRSC_SUPPORTED = 0;
|
||||
localparam logic ZAAMO_SUPPORTED = 0;
|
||||
localparam logic ZALRSC_SUPPORTED = 0;
|
||||
|
||||
// Bit manipulation extensions
|
||||
// B extension is Zba + Zbb + Zbs
|
||||
localparam ZBA_SUPPORTED = 0;
|
||||
localparam ZBB_SUPPORTED = 0;
|
||||
localparam ZBS_SUPPORTED = 0;
|
||||
localparam ZBC_SUPPORTED = 0;
|
||||
localparam logic ZBA_SUPPORTED = 0;
|
||||
localparam logic ZBB_SUPPORTED = 0;
|
||||
localparam logic ZBS_SUPPORTED = 0;
|
||||
localparam logic ZBC_SUPPORTED = 0;
|
||||
|
||||
// Scalar crypto extensions
|
||||
// Zkn is all 6
|
||||
localparam ZBKB_SUPPORTED = 0;
|
||||
localparam ZBKC_SUPPORTED = 0;
|
||||
localparam ZBKX_SUPPORTED = 0;
|
||||
localparam ZKND_SUPPORTED = 0;
|
||||
localparam ZKNE_SUPPORTED = 0;
|
||||
localparam ZKNH_SUPPORTED = 0;
|
||||
// Zkn is all 6 of these
|
||||
localparam logic ZBKB_SUPPORTED = 0;
|
||||
localparam logic ZBKC_SUPPORTED = 0;
|
||||
localparam logic ZBKX_SUPPORTED = 0;
|
||||
localparam logic ZKND_SUPPORTED = 0;
|
||||
localparam logic ZKNE_SUPPORTED = 0;
|
||||
localparam logic ZKNH_SUPPORTED = 0;
|
||||
|
||||
// Compressed extensions
|
||||
// C extension is Zca + Zcf (if RV32 and F supported) + Zcd (if D supported)
|
||||
// All compressed extensions require Zca
|
||||
localparam ZCA_SUPPORTED = 0;
|
||||
localparam ZCB_SUPPORTED = 0;
|
||||
localparam ZCF_SUPPORTED = 0; // RV32 only, requires F
|
||||
localparam ZCD_SUPPORTED = 0; // requires D
|
||||
localparam logic ZCA_SUPPORTED = 0;
|
||||
localparam logic ZCB_SUPPORTED = 0;
|
||||
localparam logic ZCF_SUPPORTED = 0; // RV32 only, requires F
|
||||
localparam logic ZCD_SUPPORTED = 0; // requires D
|
||||
|
||||
// Floating point extensions
|
||||
localparam F_SUPPORTED = 0;
|
||||
localparam D_SUPPORTED = 0;
|
||||
localparam Q_SUPPORTED = 0;
|
||||
localparam ZFH_SUPPORTED = 0;
|
||||
localparam ZFA_SUPPORTED = 0;
|
||||
localparam logic F_SUPPORTED = 0;
|
||||
localparam logic D_SUPPORTED = 0;
|
||||
localparam logic Q_SUPPORTED = 0;
|
||||
localparam logic ZFH_SUPPORTED = 0;
|
||||
localparam logic ZFA_SUPPORTED = 0;
|
||||
|
||||
// privilege modes
|
||||
localparam S_SUPPORTED = 0; // Supervisor mode
|
||||
localparam U_SUPPORTED = 0; // User mode
|
||||
localparam logic S_SUPPORTED = 0; // Supervisor mode
|
||||
localparam logic U_SUPPORTED = 0; // User mode
|
||||
|
||||
// Supervisor level extensions
|
||||
localparam SSTC_SUPPORTED = 0; // Supervisor-mode timer interrupts
|
||||
localparam logic SSTC_SUPPORTED = 0; // Supervisor-mode timer interrupts
|
||||
|
||||
// Hardware performance counters
|
||||
localparam ZICNTR_SUPPORTED = 0;
|
||||
localparam ZIHPM_SUPPORTED = 0;
|
||||
localparam logic ZICNTR_SUPPORTED = 0;
|
||||
localparam logic ZIHPM_SUPPORTED = 0;
|
||||
localparam COUNTERS = 12'd0;
|
||||
|
||||
// Cache-management operation extensions
|
||||
localparam ZICBOM_SUPPORTED = 0;
|
||||
localparam ZICBOZ_SUPPORTED = 0;
|
||||
localparam ZICBOP_SUPPORTED = 0;
|
||||
localparam logic ZICBOM_SUPPORTED = 0;
|
||||
localparam logic ZICBOZ_SUPPORTED = 0;
|
||||
localparam logic ZICBOP_SUPPORTED = 0;
|
||||
|
||||
// Virtual memory extensions
|
||||
localparam SVPBMT_SUPPORTED = 0;
|
||||
localparam SVNAPOT_SUPPORTED = 0;
|
||||
localparam SVINVAL_SUPPORTED = 0;
|
||||
localparam SVADU_SUPPORTED = 0;
|
||||
localparam logic SVPBMT_SUPPORTED = 0;
|
||||
localparam logic SVNAPOT_SUPPORTED = 0;
|
||||
localparam logic SVINVAL_SUPPORTED = 0;
|
||||
localparam logic SVADU_SUPPORTED = 0;
|
||||
|
||||
|
||||
// LSU microarchitectural Features
|
||||
localparam BUS_SUPPORTED = 1;
|
||||
localparam DCACHE_SUPPORTED = 0;
|
||||
localparam ICACHE_SUPPORTED = 0;
|
||||
localparam VIRTMEM_SUPPORTED = 0;
|
||||
localparam VECTORED_INTERRUPTS_SUPPORTED = 0;
|
||||
localparam BIGENDIAN_SUPPORTED = 0;
|
||||
localparam logic BUS_SUPPORTED = 1;
|
||||
localparam logic DCACHE_SUPPORTED = 0;
|
||||
localparam logic ICACHE_SUPPORTED = 0;
|
||||
localparam logic VIRTMEM_SUPPORTED = 0;
|
||||
localparam logic VECTORED_INTERRUPTS_SUPPORTED = 0;
|
||||
localparam logic BIGENDIAN_SUPPORTED = 0;
|
||||
|
||||
// TLB configuration. Entries should be a power of 2
|
||||
localparam ITLB_ENTRIES = 32'd0;
|
||||
@ -132,7 +132,7 @@ localparam CACHE_SRAMLEN = 32'd128;
|
||||
// Integer Divider Configuration
|
||||
// IDIV_BITSPERCYCLE must be 1, 2, or 4
|
||||
localparam IDIV_BITSPERCYCLE = 32'd1;
|
||||
localparam IDIV_ON_FPU = 0;
|
||||
localparam logic IDIV_ON_FPU = 0;
|
||||
|
||||
// Legal number of PMP entries are 0, 16, or 64
|
||||
localparam PMP_ENTRIES = 32'd0;
|
||||
@ -143,63 +143,64 @@ localparam logic [63:0] RESET_VECTOR = 64'h80000000;
|
||||
// WFI Timeout Wait
|
||||
localparam WFI_TIMEOUT_BIT = 32'd16;
|
||||
|
||||
// Peripheral Addresses
|
||||
// Peripheral Physical Addresses
|
||||
// Peripheral memory space extends from BASE to BASE+RANGE
|
||||
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
|
||||
localparam DTIM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] DTIM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] DTIM_RANGE = 64'h007FFFFF;
|
||||
localparam IROM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] IROM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] IROM_RANGE = 64'h007FFFFF;
|
||||
localparam BOOTROM_SUPPORTED = 1'b1;
|
||||
// *** each of these is `PA_BITS wide. is this paramaterizable INSIDE the config file?
|
||||
localparam logic DTIM_SUPPORTED = 0;
|
||||
localparam logic [63:0] DTIM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] DTIM_RANGE = 64'h007FFFFF;
|
||||
localparam logic IROM_SUPPORTED = 0;
|
||||
localparam logic [63:0] IROM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] IROM_RANGE = 64'h007FFFFF;
|
||||
localparam logic BOOTROM_SUPPORTED = 1;
|
||||
localparam logic [63:0] BOOTROM_BASE = 64'h00001000;
|
||||
localparam logic [63:0] BOOTROM_RANGE = 64'h00000FFF;
|
||||
localparam BOOTROM_PRELOAD = 1'b0;
|
||||
localparam logic [63:0] BOOTROM_BASE = 64'h00001000;
|
||||
localparam logic [63:0] BOOTROM_RANGE = 64'h00000FFF;
|
||||
localparam UNCORE_RAM_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] UNCORE_RAM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] UNCORE_RAM_RANGE = 64'h07FFFFFF;
|
||||
localparam logic UNCORE_RAM_SUPPORTED = 1;
|
||||
localparam logic [63:0] UNCORE_RAM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] UNCORE_RAM_RANGE = 64'h07FFFFFF;
|
||||
localparam UNCORE_RAM_PRELOAD = 1'b0;
|
||||
localparam EXT_MEM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] EXT_MEM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] EXT_MEM_RANGE = 64'h07FFFFFF;
|
||||
localparam CLINT_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] CLINT_BASE = 64'h02000000;
|
||||
localparam logic [63:0] CLINT_RANGE = 64'h0000FFFF;
|
||||
localparam GPIO_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] GPIO_BASE = 64'h10060000;
|
||||
localparam logic [63:0] GPIO_RANGE = 64'h000000FF;
|
||||
localparam UART_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] UART_BASE = 64'h10000000;
|
||||
localparam logic [63:0] UART_RANGE = 64'h00000007;
|
||||
localparam PLIC_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] PLIC_BASE = 64'h0C000000;
|
||||
localparam logic [63:0] PLIC_RANGE = 64'h03FFFFFF;
|
||||
localparam SDC_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] SDC_BASE = 64'h00013000;
|
||||
localparam logic [63:0] SDC_RANGE = 64'h0000007F;
|
||||
localparam SPI_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] SPI_BASE = 64'h10040000;
|
||||
localparam logic [63:0] SPI_RANGE = 64'h00000FFF;
|
||||
localparam logic EXT_MEM_SUPPORTED = 0;
|
||||
localparam logic [63:0] EXT_MEM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] EXT_MEM_RANGE = 64'h07FFFFFF;
|
||||
localparam logic CLINT_SUPPORTED = 0;
|
||||
localparam logic [63:0] CLINT_BASE = 64'h02000000;
|
||||
localparam logic [63:0] CLINT_RANGE = 64'h0000FFFF;
|
||||
localparam logic GPIO_SUPPORTED = 0;
|
||||
localparam logic [63:0] GPIO_BASE = 64'h10060000;
|
||||
localparam logic [63:0] GPIO_RANGE = 64'h000000FF;
|
||||
localparam logic UART_SUPPORTED = 0;
|
||||
localparam logic [63:0] UART_BASE = 64'h10000000;
|
||||
localparam logic [63:0] UART_RANGE = 64'h00000007;
|
||||
localparam logic PLIC_SUPPORTED = 0;
|
||||
localparam logic [63:0] PLIC_BASE = 64'h0C000000;
|
||||
localparam logic [63:0] PLIC_RANGE = 64'h03FFFFFF;
|
||||
localparam logic SDC_SUPPORTED = 0;
|
||||
localparam logic [63:0] SDC_BASE = 64'h00013000;
|
||||
localparam logic [63:0] SDC_RANGE = 64'h0000007F;
|
||||
localparam logic SPI_SUPPORTED = 0;
|
||||
localparam logic [63:0] SPI_BASE = 64'h10040000;
|
||||
localparam logic [63:0] SPI_RANGE = 64'h00000FFF;
|
||||
|
||||
// Bus Interface width
|
||||
localparam AHBW = 32'd32;
|
||||
localparam AHBW = (XLEN);
|
||||
|
||||
// Test modes
|
||||
|
||||
// AHB
|
||||
localparam RAM_LATENCY = 32'b0;
|
||||
localparam BURST_EN = 1;
|
||||
localparam logic BURST_EN = 1;
|
||||
|
||||
// Tie GPIO outputs back to inputs
|
||||
localparam GPIO_LOOPBACK_TEST = 1;
|
||||
localparam SPI_LOOPBACK_TEST = 0;
|
||||
localparam logic GPIO_LOOPBACK_TEST = 1;
|
||||
localparam logic SPI_LOOPBACK_TEST = 0;
|
||||
|
||||
// Hardware configuration
|
||||
localparam UART_PRESCALE = 32'd1;
|
||||
|
||||
// Interrupt configuration
|
||||
localparam PLIC_NUM_SRC = 32'd10;
|
||||
localparam PLIC_NUM_SRC = 32'd10;
|
||||
// comment out the following if >=32 sources
|
||||
localparam PLIC_NUM_SRC_LT_32 = (PLIC_NUM_SRC < 32);
|
||||
localparam PLIC_GPIO_ID = 32'd3;
|
||||
@ -208,7 +209,7 @@ localparam PLIC_SPI_ID = 32'd6;
|
||||
localparam PLIC_SDC_ID = 32'd9;
|
||||
|
||||
// Branch prediction
|
||||
localparam BPRED_SUPPORTED = 0;
|
||||
localparam logic BPRED_SUPPORTED = 0;
|
||||
localparam BPRED_TYPE = `BP_GSHARE; // BP_GSHARE_BASIC, BP_GLOBAL, BP_GLOBAL_BASIC, BP_TWOBIT
|
||||
localparam BPRED_SIZE = 32'd10;
|
||||
localparam BPRED_NUM_LHR = 32'd6;
|
||||
@ -221,7 +222,6 @@ localparam RADIX = 32'd4;
|
||||
localparam DIVCOPIES = 32'd4;
|
||||
|
||||
// Memory synthesis configuration
|
||||
localparam USE_SRAM = 0;
|
||||
localparam logic USE_SRAM = 0;
|
||||
|
||||
`include "config-shared.vh"
|
||||
|
||||
|
@ -2,10 +2,10 @@
|
||||
// config.vh
|
||||
//
|
||||
// Written: David_Harris@hmc.edu 4 January 2021
|
||||
// Modified:
|
||||
// Modified: Jordan Carlin jcarlin@hmc.edu 14 May 2024
|
||||
//
|
||||
// Purpose: Specify which features are configured
|
||||
// Macros to determine which modes are supported based on MISA
|
||||
// Purpose: Specify which features of Wally are enabled and set
|
||||
// configuration parameters
|
||||
//
|
||||
// A component of the Wally configurable RISC-V project.
|
||||
//
|
||||
@ -25,8 +25,6 @@
|
||||
// and limitations under the License.
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// include shared configuration
|
||||
// `include "wally-shared.vh"
|
||||
`include "BranchPredictorType.vh"
|
||||
|
||||
// RV32 or RV64: XLEN = 32 or 64
|
||||
@ -37,85 +35,85 @@ localparam IEEE754 = 0;
|
||||
|
||||
// RISC-V configuration per specification
|
||||
// Base instruction set (defaults to I if E is not supported)
|
||||
localparam E_SUPPORTED = 0;
|
||||
localparam logic E_SUPPORTED = 0;
|
||||
|
||||
// Integer instruction set extensions
|
||||
localparam ZIFENCEI_SUPPORTED = 1; // Instruction-Fetch fence
|
||||
localparam ZICSR_SUPPORTED = 1; // CSR Instructions
|
||||
localparam ZICCLSM_SUPPORTED = 0; // Misaligned loads/stores
|
||||
localparam ZICOND_SUPPORTED = 1; // Integer conditional operations
|
||||
localparam logic ZIFENCEI_SUPPORTED = 1; // Instruction-Fetch fence
|
||||
localparam logic ZICSR_SUPPORTED = 1; // CSR Instructions
|
||||
localparam logic ZICCLSM_SUPPORTED = 0; // Misaligned loads/stores
|
||||
localparam logic ZICOND_SUPPORTED = 1; // Integer conditional operations
|
||||
|
||||
// Multiplication & division extensions
|
||||
localparam M_SUPPORTED = 1;
|
||||
localparam ZMMUL_SUPPORTED= 0;
|
||||
localparam logic M_SUPPORTED = 1;
|
||||
localparam logic ZMMUL_SUPPORTED = 0;
|
||||
|
||||
// Atomic extensions
|
||||
// A extension is Zaamo + Zalrsc
|
||||
localparam ZAAMO_SUPPORTED = 1;
|
||||
localparam ZALRSC_SUPPORTED = 1;
|
||||
localparam logic ZAAMO_SUPPORTED = 1;
|
||||
localparam logic ZALRSC_SUPPORTED = 1;
|
||||
|
||||
// Bit manipulation extensions
|
||||
// B extension is Zba + Zbb + Zbs
|
||||
localparam ZBA_SUPPORTED = 1;
|
||||
localparam ZBB_SUPPORTED = 1;
|
||||
localparam ZBS_SUPPORTED = 1;
|
||||
localparam ZBC_SUPPORTED = 1;
|
||||
localparam logic ZBA_SUPPORTED = 1;
|
||||
localparam logic ZBB_SUPPORTED = 1;
|
||||
localparam logic ZBS_SUPPORTED = 1;
|
||||
localparam logic ZBC_SUPPORTED = 1;
|
||||
|
||||
// Scalar crypto extensions
|
||||
// Zkn is all 6
|
||||
localparam ZBKB_SUPPORTED = 1;
|
||||
localparam ZBKC_SUPPORTED = 1;
|
||||
localparam ZBKX_SUPPORTED = 1;
|
||||
localparam ZKND_SUPPORTED = 1;
|
||||
localparam ZKNE_SUPPORTED = 1;
|
||||
localparam ZKNH_SUPPORTED = 1;
|
||||
// Zkn is all 6 of these
|
||||
localparam logic ZBKB_SUPPORTED = 1;
|
||||
localparam logic ZBKC_SUPPORTED = 1;
|
||||
localparam logic ZBKX_SUPPORTED = 1;
|
||||
localparam logic ZKND_SUPPORTED = 1;
|
||||
localparam logic ZKNE_SUPPORTED = 1;
|
||||
localparam logic ZKNH_SUPPORTED = 1;
|
||||
|
||||
// Compressed extensions
|
||||
// C extension is Zca + Zcf (if RV32 and F supported) + Zcd (if D supported)
|
||||
// All compressed extensions require Zca
|
||||
localparam ZCA_SUPPORTED = 1;
|
||||
localparam ZCB_SUPPORTED = 1;
|
||||
localparam ZCF_SUPPORTED = 1; // RV32 only, requires F
|
||||
localparam ZCD_SUPPORTED = 1; // requires D
|
||||
localparam logic ZCA_SUPPORTED = 1;
|
||||
localparam logic ZCB_SUPPORTED = 1;
|
||||
localparam logic ZCF_SUPPORTED = 1; // RV32 only, requires F
|
||||
localparam logic ZCD_SUPPORTED = 1; // requires D
|
||||
|
||||
// Floating point extensions
|
||||
localparam F_SUPPORTED = 1;
|
||||
localparam D_SUPPORTED = 1;
|
||||
localparam Q_SUPPORTED = 0;
|
||||
localparam ZFH_SUPPORTED = 1;
|
||||
localparam ZFA_SUPPORTED = 1;
|
||||
localparam logic F_SUPPORTED = 1;
|
||||
localparam logic D_SUPPORTED = 1;
|
||||
localparam logic Q_SUPPORTED = 0;
|
||||
localparam logic ZFH_SUPPORTED = 1;
|
||||
localparam logic ZFA_SUPPORTED = 1;
|
||||
|
||||
// privilege modes
|
||||
localparam S_SUPPORTED = 1; // Supervisor mode
|
||||
localparam U_SUPPORTED = 1; // User mode
|
||||
localparam logic S_SUPPORTED = 1; // Supervisor mode
|
||||
localparam logic U_SUPPORTED = 1; // User mode
|
||||
|
||||
// Supervisor level extensions
|
||||
localparam SSTC_SUPPORTED = 1; // Supervisor-mode timer interrupts
|
||||
localparam logic SSTC_SUPPORTED = 1; // Supervisor-mode timer interrupts
|
||||
|
||||
// Hardware performance counters
|
||||
localparam ZICNTR_SUPPORTED = 1;
|
||||
localparam ZIHPM_SUPPORTED = 1;
|
||||
localparam logic ZICNTR_SUPPORTED = 1;
|
||||
localparam logic ZIHPM_SUPPORTED = 1;
|
||||
localparam COUNTERS = 12'd32;
|
||||
|
||||
// Cache-management operation extensions
|
||||
localparam ZICBOM_SUPPORTED = 1;
|
||||
localparam ZICBOZ_SUPPORTED = 1;
|
||||
localparam ZICBOP_SUPPORTED = 1;
|
||||
localparam logic ZICBOM_SUPPORTED = 1;
|
||||
localparam logic ZICBOZ_SUPPORTED = 1;
|
||||
localparam logic ZICBOP_SUPPORTED = 1;
|
||||
|
||||
// Virtual memory extensions
|
||||
localparam SVPBMT_SUPPORTED = 0;
|
||||
localparam SVNAPOT_SUPPORTED = 0;
|
||||
localparam SVINVAL_SUPPORTED = 1;
|
||||
localparam SVADU_SUPPORTED = 1;
|
||||
localparam logic SVPBMT_SUPPORTED = 0;
|
||||
localparam logic SVNAPOT_SUPPORTED = 0;
|
||||
localparam logic SVINVAL_SUPPORTED = 1;
|
||||
localparam logic SVADU_SUPPORTED = 1;
|
||||
|
||||
|
||||
// LSU microarchitectural Features
|
||||
localparam BUS_SUPPORTED = 1;
|
||||
localparam DCACHE_SUPPORTED = 1;
|
||||
localparam ICACHE_SUPPORTED = 1;
|
||||
localparam VIRTMEM_SUPPORTED = 1;
|
||||
localparam VECTORED_INTERRUPTS_SUPPORTED = 1;
|
||||
localparam BIGENDIAN_SUPPORTED = 1;
|
||||
localparam logic BUS_SUPPORTED = 1;
|
||||
localparam logic DCACHE_SUPPORTED = 1;
|
||||
localparam logic ICACHE_SUPPORTED = 1;
|
||||
localparam logic VIRTMEM_SUPPORTED = 1;
|
||||
localparam logic VECTORED_INTERRUPTS_SUPPORTED = 1;
|
||||
localparam logic BIGENDIAN_SUPPORTED = 1;
|
||||
|
||||
// TLB configuration. Entries should be a power of 2
|
||||
localparam ITLB_ENTRIES = 32'd32;
|
||||
@ -134,7 +132,7 @@ localparam CACHE_SRAMLEN = 32'd128;
|
||||
// Integer Divider Configuration
|
||||
// IDIV_BITSPERCYCLE must be 1, 2, or 4
|
||||
localparam IDIV_BITSPERCYCLE = 32'd2;
|
||||
localparam IDIV_ON_FPU = 0;
|
||||
localparam logic IDIV_ON_FPU = 0;
|
||||
|
||||
// Legal number of PMP entries are 0, 16, or 64
|
||||
localparam PMP_ENTRIES = 32'd16;
|
||||
@ -145,57 +143,58 @@ localparam logic [63:0] RESET_VECTOR = 64'h80000000;
|
||||
// WFI Timeout Wait
|
||||
localparam WFI_TIMEOUT_BIT = 32'd16;
|
||||
|
||||
// Peripheral Addresses
|
||||
// Peripheral Physical Addresses
|
||||
// Peripheral memory space extends from BASE to BASE+RANGE
|
||||
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
|
||||
localparam DTIM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] DTIM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] DTIM_RANGE = 64'h007FFFFF;
|
||||
localparam IROM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] IROM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] IROM_RANGE = 64'h007FFFFF;
|
||||
localparam BOOTROM_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] BOOTROM_BASE = 64'h00001000;
|
||||
localparam logic [63:0] BOOTROM_RANGE = 64'h00000FFF;
|
||||
// *** each of these is `PA_BITS wide. is this paramaterizable INSIDE the config file?
|
||||
localparam logic DTIM_SUPPORTED = 0;
|
||||
localparam logic [63:0] DTIM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] DTIM_RANGE = 64'h007FFFFF;
|
||||
localparam logic IROM_SUPPORTED = 0;
|
||||
localparam logic [63:0] IROM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] IROM_RANGE = 64'h007FFFFF;
|
||||
localparam logic BOOTROM_SUPPORTED = 1;
|
||||
localparam logic [63:0] BOOTROM_BASE = 64'h00001000;
|
||||
localparam logic [63:0] BOOTROM_RANGE = 64'h00000FFF;
|
||||
localparam BOOTROM_PRELOAD = 1'b0;
|
||||
localparam UNCORE_RAM_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] UNCORE_RAM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] UNCORE_RAM_RANGE = 64'h07FFFFFF;
|
||||
localparam logic UNCORE_RAM_SUPPORTED = 1;
|
||||
localparam logic [63:0] UNCORE_RAM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] UNCORE_RAM_RANGE = 64'h07FFFFFF;
|
||||
localparam UNCORE_RAM_PRELOAD = 1'b0;
|
||||
localparam EXT_MEM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] EXT_MEM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] EXT_MEM_RANGE = 64'h07FFFFFF;
|
||||
localparam CLINT_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] CLINT_BASE = 64'h02000000;
|
||||
localparam logic [63:0] CLINT_RANGE = 64'h0000FFFF;
|
||||
localparam GPIO_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] GPIO_BASE = 64'h10060000;
|
||||
localparam logic [63:0] GPIO_RANGE = 64'h000000FF;
|
||||
localparam UART_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] UART_BASE = 64'h10000000;
|
||||
localparam logic [63:0] UART_RANGE = 64'h00000007;
|
||||
localparam PLIC_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] PLIC_BASE = 64'h0C000000;
|
||||
localparam logic [63:0] PLIC_RANGE = 64'h03FFFFFF;
|
||||
localparam SDC_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] SDC_BASE = 64'h00013000;
|
||||
localparam logic [63:0] SDC_RANGE = 64'h0000007F;
|
||||
localparam SPI_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] SPI_BASE = 64'h10040000;
|
||||
localparam logic [63:0] SPI_RANGE = 64'h00000FFF;
|
||||
localparam logic EXT_MEM_SUPPORTED = 0;
|
||||
localparam logic [63:0] EXT_MEM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] EXT_MEM_RANGE = 64'h07FFFFFF;
|
||||
localparam logic CLINT_SUPPORTED = 1;
|
||||
localparam logic [63:0] CLINT_BASE = 64'h02000000;
|
||||
localparam logic [63:0] CLINT_RANGE = 64'h0000FFFF;
|
||||
localparam logic GPIO_SUPPORTED = 1;
|
||||
localparam logic [63:0] GPIO_BASE = 64'h10060000;
|
||||
localparam logic [63:0] GPIO_RANGE = 64'h000000FF;
|
||||
localparam logic UART_SUPPORTED = 1;
|
||||
localparam logic [63:0] UART_BASE = 64'h10000000;
|
||||
localparam logic [63:0] UART_RANGE = 64'h00000007;
|
||||
localparam logic PLIC_SUPPORTED = 1;
|
||||
localparam logic [63:0] PLIC_BASE = 64'h0C000000;
|
||||
localparam logic [63:0] PLIC_RANGE = 64'h03FFFFFF;
|
||||
localparam logic SDC_SUPPORTED = 0;
|
||||
localparam logic [63:0] SDC_BASE = 64'h00013000;
|
||||
localparam logic [63:0] SDC_RANGE = 64'h0000007F;
|
||||
localparam logic SPI_SUPPORTED = 1;
|
||||
localparam logic [63:0] SPI_BASE = 64'h10040000;
|
||||
localparam logic [63:0] SPI_RANGE = 64'h00000FFF;
|
||||
|
||||
// Bus Interface width
|
||||
localparam AHBW = 32'd32;
|
||||
localparam AHBW = (XLEN);
|
||||
|
||||
// Test modes
|
||||
|
||||
// AHB
|
||||
localparam RAM_LATENCY = 32'b0;
|
||||
localparam BURST_EN = 1;
|
||||
localparam logic BURST_EN = 1;
|
||||
|
||||
// Tie GPIO outputs back to inputs
|
||||
localparam GPIO_LOOPBACK_TEST = 1;
|
||||
localparam SPI_LOOPBACK_TEST = 1;
|
||||
localparam logic GPIO_LOOPBACK_TEST = 1;
|
||||
localparam logic SPI_LOOPBACK_TEST = 1;
|
||||
|
||||
// Hardware configuration
|
||||
localparam UART_PRESCALE = 32'd1;
|
||||
@ -210,7 +209,7 @@ localparam PLIC_SPI_ID = 32'd6;
|
||||
localparam PLIC_SDC_ID = 32'd9;
|
||||
|
||||
// Branch prediction
|
||||
localparam BPRED_SUPPORTED = 1;
|
||||
localparam logic BPRED_SUPPORTED = 1;
|
||||
localparam BPRED_TYPE = `BP_GSHARE; // BP_GSHARE_BASIC, BP_GLOBAL, BP_GLOBAL_BASIC, BP_TWOBIT
|
||||
localparam BPRED_SIZE = 32'd10;
|
||||
localparam BPRED_NUM_LHR = 32'd6;
|
||||
@ -223,6 +222,6 @@ localparam RADIX = 32'd4;
|
||||
localparam DIVCOPIES = 32'd2;
|
||||
|
||||
// Memory synthesis configuration
|
||||
localparam USE_SRAM = 0;
|
||||
localparam logic USE_SRAM = 0;
|
||||
|
||||
`include "config-shared.vh"
|
||||
|
@ -2,10 +2,10 @@
|
||||
// config.vh
|
||||
//
|
||||
// Written: David_Harris@hmc.edu 4 January 2021
|
||||
// Modified:
|
||||
// Modified: Jordan Carlin jcarlin@hmc.edu 14 May 2024
|
||||
//
|
||||
// Purpose: Specify which features are configured
|
||||
// Macros to determine which modes are supported based on MISA
|
||||
// Purpose: Specify which features of Wally are enabled and set
|
||||
// configuration parameters
|
||||
//
|
||||
// A component of the Wally configurable RISC-V project.
|
||||
//
|
||||
@ -35,85 +35,85 @@ localparam IEEE754 = 0;
|
||||
|
||||
// RISC-V configuration per specification
|
||||
// Base instruction set (defaults to I if E is not supported)
|
||||
localparam E_SUPPORTED = 0;
|
||||
localparam logic E_SUPPORTED = 0;
|
||||
|
||||
// Integer instruction set extensions
|
||||
localparam ZIFENCEI_SUPPORTED = 0; // Instruction-Fetch fence
|
||||
localparam ZICSR_SUPPORTED = 0; // CSR Instructions
|
||||
localparam ZICCLSM_SUPPORTED = 0; // Misaligned loads/stores
|
||||
localparam ZICOND_SUPPORTED = 0; // Integer conditional operations
|
||||
localparam logic ZIFENCEI_SUPPORTED = 0; // Instruction-Fetch fence
|
||||
localparam logic ZICSR_SUPPORTED = 0; // CSR Instructions
|
||||
localparam logic ZICCLSM_SUPPORTED = 0; // Misaligned loads/stores
|
||||
localparam logic ZICOND_SUPPORTED = 0; // Integer conditional operations
|
||||
|
||||
// Multiplication & division extensions
|
||||
localparam M_SUPPORTED = 0;
|
||||
localparam ZMMUL_SUPPORTED= 0;
|
||||
localparam logic M_SUPPORTED = 0;
|
||||
localparam logic ZMMUL_SUPPORTED = 0;
|
||||
|
||||
// Atomic extensions
|
||||
// A extension is Zaamo + Zalrsc
|
||||
localparam ZAAMO_SUPPORTED = 0;
|
||||
localparam ZALRSC_SUPPORTED = 0;
|
||||
localparam logic ZAAMO_SUPPORTED = 0;
|
||||
localparam logic ZALRSC_SUPPORTED = 0;
|
||||
|
||||
// Bit manipulation extensions
|
||||
// B extension is Zba + Zbb + Zbs
|
||||
localparam ZBA_SUPPORTED = 0;
|
||||
localparam ZBB_SUPPORTED = 0;
|
||||
localparam ZBS_SUPPORTED = 0;
|
||||
localparam ZBC_SUPPORTED = 0;
|
||||
localparam logic ZBA_SUPPORTED = 0;
|
||||
localparam logic ZBB_SUPPORTED = 0;
|
||||
localparam logic ZBS_SUPPORTED = 0;
|
||||
localparam logic ZBC_SUPPORTED = 0;
|
||||
|
||||
// Scalar crypto extensions
|
||||
// Zkn is all 6
|
||||
localparam ZBKB_SUPPORTED = 0;
|
||||
localparam ZBKC_SUPPORTED = 0;
|
||||
localparam ZBKX_SUPPORTED = 0;
|
||||
localparam ZKND_SUPPORTED = 0;
|
||||
localparam ZKNE_SUPPORTED = 0;
|
||||
localparam ZKNH_SUPPORTED = 0;
|
||||
// Zkn is all 6 of these
|
||||
localparam logic ZBKB_SUPPORTED = 0;
|
||||
localparam logic ZBKC_SUPPORTED = 0;
|
||||
localparam logic ZBKX_SUPPORTED = 0;
|
||||
localparam logic ZKND_SUPPORTED = 0;
|
||||
localparam logic ZKNE_SUPPORTED = 0;
|
||||
localparam logic ZKNH_SUPPORTED = 0;
|
||||
|
||||
// Compressed extensions
|
||||
// C extension is Zca + Zcf (if RV32 and F supported) + Zcd (if D supported)
|
||||
// All compressed extensions require Zca
|
||||
localparam ZCA_SUPPORTED = 0;
|
||||
localparam ZCB_SUPPORTED = 0;
|
||||
localparam ZCF_SUPPORTED = 0; // RV32 only, requires F
|
||||
localparam ZCD_SUPPORTED = 0; // requires D
|
||||
localparam logic ZCA_SUPPORTED = 0;
|
||||
localparam logic ZCB_SUPPORTED = 0;
|
||||
localparam logic ZCF_SUPPORTED = 0; // RV32 only, requires F
|
||||
localparam logic ZCD_SUPPORTED = 0; // requires D
|
||||
|
||||
// Floating point extensions
|
||||
localparam F_SUPPORTED = 0;
|
||||
localparam D_SUPPORTED = 0;
|
||||
localparam Q_SUPPORTED = 0;
|
||||
localparam ZFH_SUPPORTED = 0;
|
||||
localparam ZFA_SUPPORTED = 0;
|
||||
localparam logic F_SUPPORTED = 0;
|
||||
localparam logic D_SUPPORTED = 0;
|
||||
localparam logic Q_SUPPORTED = 0;
|
||||
localparam logic ZFH_SUPPORTED = 0;
|
||||
localparam logic ZFA_SUPPORTED = 0;
|
||||
|
||||
// privilege modes
|
||||
localparam S_SUPPORTED = 0; // Supervisor mode
|
||||
localparam U_SUPPORTED = 0; // User mode
|
||||
localparam logic S_SUPPORTED = 0; // Supervisor mode
|
||||
localparam logic U_SUPPORTED = 0; // User mode
|
||||
|
||||
// Supervisor level extensions
|
||||
localparam SSTC_SUPPORTED = 0; // Supervisor-mode timer interrupts
|
||||
localparam logic SSTC_SUPPORTED = 0; // Supervisor-mode timer interrupts
|
||||
|
||||
// Hardware performance counters
|
||||
localparam ZICNTR_SUPPORTED = 0;
|
||||
localparam ZIHPM_SUPPORTED = 0;
|
||||
localparam COUNTERS = 0;
|
||||
localparam logic ZICNTR_SUPPORTED = 0;
|
||||
localparam logic ZIHPM_SUPPORTED = 0;
|
||||
localparam COUNTERS = 12'd0;
|
||||
|
||||
// Cache-management operation extensions
|
||||
localparam ZICBOM_SUPPORTED = 0;
|
||||
localparam ZICBOZ_SUPPORTED = 0;
|
||||
localparam ZICBOP_SUPPORTED = 0;
|
||||
localparam logic ZICBOM_SUPPORTED = 0;
|
||||
localparam logic ZICBOZ_SUPPORTED = 0;
|
||||
localparam logic ZICBOP_SUPPORTED = 0;
|
||||
|
||||
// Virtual memory extensions
|
||||
localparam SVPBMT_SUPPORTED = 0;
|
||||
localparam SVNAPOT_SUPPORTED = 0;
|
||||
localparam SVINVAL_SUPPORTED = 0;
|
||||
localparam SVADU_SUPPORTED = 0;
|
||||
localparam logic SVPBMT_SUPPORTED = 0;
|
||||
localparam logic SVNAPOT_SUPPORTED = 0;
|
||||
localparam logic SVINVAL_SUPPORTED = 0;
|
||||
localparam logic SVADU_SUPPORTED = 0;
|
||||
|
||||
|
||||
// LSU microarchitectural Features
|
||||
localparam BUS_SUPPORTED = 0;
|
||||
localparam DCACHE_SUPPORTED = 0;
|
||||
localparam ICACHE_SUPPORTED = 0;
|
||||
localparam VIRTMEM_SUPPORTED = 0;
|
||||
localparam VECTORED_INTERRUPTS_SUPPORTED = 1;
|
||||
localparam BIGENDIAN_SUPPORTED = 0;
|
||||
localparam logic BUS_SUPPORTED = 0;
|
||||
localparam logic DCACHE_SUPPORTED = 0;
|
||||
localparam logic ICACHE_SUPPORTED = 0;
|
||||
localparam logic VIRTMEM_SUPPORTED = 0;
|
||||
localparam logic VECTORED_INTERRUPTS_SUPPORTED = 1;
|
||||
localparam logic BIGENDIAN_SUPPORTED = 0;
|
||||
|
||||
// TLB configuration. Entries should be a power of 2
|
||||
localparam ITLB_ENTRIES = 32'd32;
|
||||
@ -132,7 +132,7 @@ localparam CACHE_SRAMLEN = 32'd128;
|
||||
// Integer Divider Configuration
|
||||
// IDIV_BITSPERCYCLE must be 1, 2, or 4
|
||||
localparam IDIV_BITSPERCYCLE = 32'd4;
|
||||
localparam IDIV_ON_FPU = 0;
|
||||
localparam logic IDIV_ON_FPU = 0;
|
||||
|
||||
// Legal number of PMP entries are 0, 16, or 64
|
||||
localparam PMP_ENTRIES = 32'd0;
|
||||
@ -143,57 +143,58 @@ localparam logic [63:0] RESET_VECTOR = 64'h80000000;
|
||||
// WFI Timeout Wait
|
||||
localparam WFI_TIMEOUT_BIT = 32'd16;
|
||||
|
||||
// Peripheral Addresses
|
||||
// Peripheral Physical Addresses
|
||||
// Peripheral memory space extends from BASE to BASE+RANGE
|
||||
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
|
||||
localparam DTIM_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] DTIM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] DTIM_RANGE = 64'h007FFFFF;
|
||||
localparam IROM_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] IROM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] IROM_RANGE = 64'h007FFFFF;
|
||||
localparam BOOTROM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] BOOTROM_BASE = 64'h00001000;
|
||||
localparam logic [63:0] BOOTROM_RANGE = 64'h00000FFF;
|
||||
// *** each of these is `PA_BITS wide. is this paramaterizable INSIDE the config file?
|
||||
localparam logic DTIM_SUPPORTED = 1;
|
||||
localparam logic [63:0] DTIM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] DTIM_RANGE = 64'h007FFFFF;
|
||||
localparam logic IROM_SUPPORTED = 1;
|
||||
localparam logic [63:0] IROM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] IROM_RANGE = 64'h007FFFFF;
|
||||
localparam logic BOOTROM_SUPPORTED = 0;
|
||||
localparam logic [63:0] BOOTROM_BASE = 64'h00001000;
|
||||
localparam logic [63:0] BOOTROM_RANGE = 64'h00000FFF;
|
||||
localparam BOOTROM_PRELOAD = 1'b0;
|
||||
localparam UNCORE_RAM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] UNCORE_RAM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] UNCORE_RAM_RANGE = 64'h07FFFFFF;
|
||||
localparam logic UNCORE_RAM_SUPPORTED = 0;
|
||||
localparam logic [63:0] UNCORE_RAM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] UNCORE_RAM_RANGE = 64'h07FFFFFF;
|
||||
localparam UNCORE_RAM_PRELOAD = 1'b0;
|
||||
localparam EXT_MEM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] EXT_MEM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] EXT_MEM_RANGE = 64'h07FFFFFF;
|
||||
localparam CLINT_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] CLINT_BASE = 64'h02000000;
|
||||
localparam logic [63:0] CLINT_RANGE = 64'h0000FFFF;
|
||||
localparam GPIO_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] GPIO_BASE = 64'h10060000;
|
||||
localparam logic [63:0] GPIO_RANGE = 64'h000000FF;
|
||||
localparam UART_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] UART_BASE = 64'h10000000;
|
||||
localparam logic [63:0] UART_RANGE = 64'h00000007;
|
||||
localparam PLIC_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] PLIC_BASE = 64'h0C000000;
|
||||
localparam logic [63:0] PLIC_RANGE = 64'h03FFFFFF;
|
||||
localparam SDC_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] SDC_BASE = 64'h00013000;
|
||||
localparam logic [63:0] SDC_RANGE = 64'h0000007F;
|
||||
localparam SPI_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] SPI_BASE = 64'h10040000;
|
||||
localparam logic [63:0] SPI_RANGE = 64'h00000FFF;
|
||||
localparam logic EXT_MEM_SUPPORTED = 0;
|
||||
localparam logic [63:0] EXT_MEM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] EXT_MEM_RANGE = 64'h07FFFFFF;
|
||||
localparam logic CLINT_SUPPORTED = 0;
|
||||
localparam logic [63:0] CLINT_BASE = 64'h02000000;
|
||||
localparam logic [63:0] CLINT_RANGE = 64'h0000FFFF;
|
||||
localparam logic GPIO_SUPPORTED = 0;
|
||||
localparam logic [63:0] GPIO_BASE = 64'h10060000;
|
||||
localparam logic [63:0] GPIO_RANGE = 64'h000000FF;
|
||||
localparam logic UART_SUPPORTED = 0;
|
||||
localparam logic [63:0] UART_BASE = 64'h10000000;
|
||||
localparam logic [63:0] UART_RANGE = 64'h00000007;
|
||||
localparam logic PLIC_SUPPORTED = 0;
|
||||
localparam logic [63:0] PLIC_BASE = 64'h0C000000;
|
||||
localparam logic [63:0] PLIC_RANGE = 64'h03FFFFFF;
|
||||
localparam logic SDC_SUPPORTED = 0;
|
||||
localparam logic [63:0] SDC_BASE = 64'h00013000;
|
||||
localparam logic [63:0] SDC_RANGE = 64'h0000007F;
|
||||
localparam logic SPI_SUPPORTED = 0;
|
||||
localparam logic [63:0] SPI_BASE = 64'h10040000;
|
||||
localparam logic [63:0] SPI_RANGE = 64'h00000FFF;
|
||||
|
||||
// Bus Interface width
|
||||
localparam AHBW = 32'd32;
|
||||
localparam AHBW = (XLEN);
|
||||
|
||||
// Test modes
|
||||
|
||||
// AHB
|
||||
localparam RAM_LATENCY = 32'b0;
|
||||
localparam BURST_EN = 1;
|
||||
localparam logic BURST_EN = 1;
|
||||
|
||||
// Tie GPIO outputs back to inputs
|
||||
localparam GPIO_LOOPBACK_TEST = 1;
|
||||
localparam SPI_LOOPBACK_TEST = 1;
|
||||
localparam logic GPIO_LOOPBACK_TEST = 1;
|
||||
localparam logic SPI_LOOPBACK_TEST = 1;
|
||||
|
||||
// Hardware configuration
|
||||
localparam UART_PRESCALE = 32'd1;
|
||||
@ -208,7 +209,7 @@ localparam PLIC_SPI_ID = 32'd6;
|
||||
localparam PLIC_SDC_ID = 32'd9;
|
||||
|
||||
// Branch prediction
|
||||
localparam BPRED_SUPPORTED = 0;
|
||||
localparam logic BPRED_SUPPORTED = 0;
|
||||
localparam BPRED_TYPE = `BP_GSHARE; // BP_GSHARE_BASIC, BP_GLOBAL, BP_GLOBAL_BASIC, BP_TWOBIT
|
||||
localparam BPRED_SIZE = 32'd10;
|
||||
localparam BPRED_NUM_LHR = 32'd6;
|
||||
@ -217,10 +218,10 @@ localparam RAS_SIZE = 32'd16;
|
||||
localparam INSTR_CLASS_PRED = 0;
|
||||
|
||||
// FPU division architecture
|
||||
localparam RADIX = 32'h4;
|
||||
localparam DIVCOPIES = 32'h4;
|
||||
localparam RADIX = 32'd4;
|
||||
localparam DIVCOPIES = 32'd4;
|
||||
|
||||
// Memory synthesis configuration
|
||||
localparam USE_SRAM = 0;
|
||||
localparam logic USE_SRAM = 0;
|
||||
|
||||
`include "config-shared.vh"
|
||||
|
@ -2,10 +2,10 @@
|
||||
// config.vh
|
||||
//
|
||||
// Written: David_Harris@hmc.edu 4 January 2021
|
||||
// Modified:
|
||||
// Modified: Jordan Carlin jcarlin@hmc.edu 14 May 2024
|
||||
//
|
||||
// Purpose: Specify which features are configured
|
||||
// Macros to determine which modes are supported based on MISA
|
||||
// Purpose: Specify which features of Wally are enabled and set
|
||||
// configuration parameters
|
||||
//
|
||||
// A component of the Wally configurable RISC-V project.
|
||||
//
|
||||
@ -35,85 +35,85 @@ localparam IEEE754 = 0;
|
||||
|
||||
// RISC-V configuration per specification
|
||||
// Base instruction set (defaults to I if E is not supported)
|
||||
localparam E_SUPPORTED = 0;
|
||||
localparam logic E_SUPPORTED = 0;
|
||||
|
||||
// Integer instruction set extensions
|
||||
localparam ZIFENCEI_SUPPORTED = 1; // Instruction-Fetch fence
|
||||
localparam ZICSR_SUPPORTED = 1; // CSR Instructions
|
||||
localparam ZICCLSM_SUPPORTED = 0; // Misaligned loads/stores
|
||||
localparam ZICOND_SUPPORTED = 0; // Integer conditional operations
|
||||
localparam logic ZIFENCEI_SUPPORTED = 1; // Instruction-Fetch fence
|
||||
localparam logic ZICSR_SUPPORTED = 1; // CSR Instructions
|
||||
localparam logic ZICCLSM_SUPPORTED = 0; // Misaligned loads/stores
|
||||
localparam logic ZICOND_SUPPORTED = 0; // Integer conditional operations
|
||||
|
||||
// Multiplication & division extensions
|
||||
localparam M_SUPPORTED = 1;
|
||||
localparam ZMMUL_SUPPORTED= 0;
|
||||
localparam logic M_SUPPORTED = 1;
|
||||
localparam logic ZMMUL_SUPPORTED = 0;
|
||||
|
||||
// Atomic extensions
|
||||
// A extension is Zaamo + Zalrsc
|
||||
localparam ZAAMO_SUPPORTED = 0;
|
||||
localparam ZALRSC_SUPPORTED = 0;
|
||||
localparam logic ZAAMO_SUPPORTED = 0;
|
||||
localparam logic ZALRSC_SUPPORTED = 0;
|
||||
|
||||
// Bit manipulation extensions
|
||||
// B extension is Zba + Zbb + Zbs
|
||||
localparam ZBA_SUPPORTED = 0;
|
||||
localparam ZBB_SUPPORTED = 0;
|
||||
localparam ZBS_SUPPORTED = 0;
|
||||
localparam ZBC_SUPPORTED = 0;
|
||||
localparam logic ZBA_SUPPORTED = 0;
|
||||
localparam logic ZBB_SUPPORTED = 0;
|
||||
localparam logic ZBS_SUPPORTED = 0;
|
||||
localparam logic ZBC_SUPPORTED = 0;
|
||||
|
||||
// Scalar crypto extensions
|
||||
// Zkn is all 6
|
||||
localparam ZBKB_SUPPORTED = 0;
|
||||
localparam ZBKC_SUPPORTED = 0;
|
||||
localparam ZBKX_SUPPORTED = 0;
|
||||
localparam ZKND_SUPPORTED = 0;
|
||||
localparam ZKNE_SUPPORTED = 0;
|
||||
localparam ZKNH_SUPPORTED = 0;
|
||||
// Zkn is all 6 of these
|
||||
localparam logic ZBKB_SUPPORTED = 0;
|
||||
localparam logic ZBKC_SUPPORTED = 0;
|
||||
localparam logic ZBKX_SUPPORTED = 0;
|
||||
localparam logic ZKND_SUPPORTED = 0;
|
||||
localparam logic ZKNE_SUPPORTED = 0;
|
||||
localparam logic ZKNH_SUPPORTED = 0;
|
||||
|
||||
// Compressed extensions
|
||||
// C extension is Zca + Zcf (if RV32 and F supported) + Zcd (if D supported)
|
||||
// All compressed extensions require Zca
|
||||
localparam ZCA_SUPPORTED = 1;
|
||||
localparam ZCB_SUPPORTED = 0;
|
||||
localparam ZCF_SUPPORTED = 0; // RV32 only, requires F
|
||||
localparam ZCD_SUPPORTED = 0; // requires D
|
||||
localparam logic ZCA_SUPPORTED = 1;
|
||||
localparam logic ZCB_SUPPORTED = 0;
|
||||
localparam logic ZCF_SUPPORTED = 0; // RV32 only, requires F
|
||||
localparam logic ZCD_SUPPORTED = 0; // requires D
|
||||
|
||||
// Floating point extensions
|
||||
localparam F_SUPPORTED = 0;
|
||||
localparam D_SUPPORTED = 0;
|
||||
localparam Q_SUPPORTED = 0;
|
||||
localparam ZFH_SUPPORTED = 0;
|
||||
localparam ZFA_SUPPORTED = 0;
|
||||
localparam logic F_SUPPORTED = 0;
|
||||
localparam logic D_SUPPORTED = 0;
|
||||
localparam logic Q_SUPPORTED = 0;
|
||||
localparam logic ZFH_SUPPORTED = 0;
|
||||
localparam logic ZFA_SUPPORTED = 0;
|
||||
|
||||
// privilege modes
|
||||
localparam S_SUPPORTED = 1; // Supervisor mode
|
||||
localparam U_SUPPORTED = 1; // User mode
|
||||
localparam logic S_SUPPORTED = 1; // Supervisor mode
|
||||
localparam logic U_SUPPORTED = 1; // User mode
|
||||
|
||||
// Supervisor level extensions
|
||||
localparam SSTC_SUPPORTED = 0; // Supervisor-mode timer interrupts
|
||||
localparam logic SSTC_SUPPORTED = 0; // Supervisor-mode timer interrupts
|
||||
|
||||
// Hardware performance counters
|
||||
localparam ZICNTR_SUPPORTED = 1;
|
||||
localparam ZIHPM_SUPPORTED = 1;
|
||||
localparam logic ZICNTR_SUPPORTED = 1;
|
||||
localparam logic ZIHPM_SUPPORTED = 1;
|
||||
localparam COUNTERS = 12'd32;
|
||||
|
||||
// Cache-management operation extensions
|
||||
localparam ZICBOM_SUPPORTED = 0;
|
||||
localparam ZICBOZ_SUPPORTED = 0;
|
||||
localparam ZICBOP_SUPPORTED = 0;
|
||||
localparam logic ZICBOM_SUPPORTED = 0;
|
||||
localparam logic ZICBOZ_SUPPORTED = 0;
|
||||
localparam logic ZICBOP_SUPPORTED = 0;
|
||||
|
||||
// Virtual memory extensions
|
||||
localparam SVPBMT_SUPPORTED = 0;
|
||||
localparam SVNAPOT_SUPPORTED = 0;
|
||||
localparam SVINVAL_SUPPORTED = 0;
|
||||
localparam SVADU_SUPPORTED = 0;
|
||||
localparam logic SVPBMT_SUPPORTED = 0;
|
||||
localparam logic SVNAPOT_SUPPORTED = 0;
|
||||
localparam logic SVINVAL_SUPPORTED = 0;
|
||||
localparam logic SVADU_SUPPORTED = 0;
|
||||
|
||||
|
||||
// LSU microarchitectural Features
|
||||
localparam BUS_SUPPORTED = 1;
|
||||
localparam DCACHE_SUPPORTED = 0;
|
||||
localparam ICACHE_SUPPORTED = 0;
|
||||
localparam VIRTMEM_SUPPORTED = 0;
|
||||
localparam VECTORED_INTERRUPTS_SUPPORTED = 1;
|
||||
localparam BIGENDIAN_SUPPORTED = 0;
|
||||
localparam logic BUS_SUPPORTED = 1;
|
||||
localparam logic DCACHE_SUPPORTED = 0;
|
||||
localparam logic ICACHE_SUPPORTED = 0;
|
||||
localparam logic VIRTMEM_SUPPORTED = 0;
|
||||
localparam logic VECTORED_INTERRUPTS_SUPPORTED = 1;
|
||||
localparam logic BIGENDIAN_SUPPORTED = 0;
|
||||
|
||||
// TLB configuration. Entries should be a power of 2
|
||||
localparam ITLB_ENTRIES = 32'd0;
|
||||
@ -132,7 +132,7 @@ localparam CACHE_SRAMLEN = 32'd128;
|
||||
// Integer Divider Configuration
|
||||
// IDIV_BITSPERCYCLE must be 1, 2, or 4
|
||||
localparam IDIV_BITSPERCYCLE = 32'd2;
|
||||
localparam IDIV_ON_FPU = 0;
|
||||
localparam logic IDIV_ON_FPU = 0;
|
||||
|
||||
// Legal number of PMP entries are 0, 16, or 64
|
||||
localparam PMP_ENTRIES = 32'd0;
|
||||
@ -143,57 +143,58 @@ localparam logic [63:0] RESET_VECTOR = 64'h80000000;
|
||||
// WFI Timeout Wait
|
||||
localparam WFI_TIMEOUT_BIT = 32'd16;
|
||||
|
||||
// Peripheral Addresses
|
||||
// Peripheral Physical Addresses
|
||||
// Peripheral memory space extends from BASE to BASE+RANGE
|
||||
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
|
||||
localparam DTIM_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] DTIM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] DTIM_RANGE = 64'h007FFFFF;
|
||||
localparam IROM_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] IROM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] IROM_RANGE = 64'h007FFFFF;
|
||||
localparam BOOTROM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] BOOTROM_BASE = 64'h00001000;
|
||||
localparam logic [63:0] BOOTROM_RANGE = 64'h00000FFF;
|
||||
// *** each of these is `PA_BITS wide. is this paramaterizable INSIDE the config file?
|
||||
localparam logic DTIM_SUPPORTED = 1;
|
||||
localparam logic [63:0] DTIM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] DTIM_RANGE = 64'h007FFFFF;
|
||||
localparam logic IROM_SUPPORTED = 1;
|
||||
localparam logic [63:0] IROM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] IROM_RANGE = 64'h007FFFFF;
|
||||
localparam logic BOOTROM_SUPPORTED = 0;
|
||||
localparam logic [63:0] BOOTROM_BASE = 64'h00001000;
|
||||
localparam logic [63:0] BOOTROM_RANGE = 64'h00000FFF;
|
||||
localparam BOOTROM_PRELOAD = 1'b0;
|
||||
localparam UNCORE_RAM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] UNCORE_RAM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] UNCORE_RAM_RANGE = 64'h07FFFFFF;
|
||||
localparam logic UNCORE_RAM_SUPPORTED = 0;
|
||||
localparam logic [63:0] UNCORE_RAM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] UNCORE_RAM_RANGE = 64'h07FFFFFF;
|
||||
localparam UNCORE_RAM_PRELOAD = 1'b0;
|
||||
localparam EXT_MEM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] EXT_MEM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] EXT_MEM_RANGE = 64'h07FFFFFF;
|
||||
localparam CLINT_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] CLINT_BASE = 64'h02000000;
|
||||
localparam logic [63:0] CLINT_RANGE = 64'h0000FFFF;
|
||||
localparam GPIO_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] GPIO_BASE = 64'h10060000;
|
||||
localparam logic [63:0] GPIO_RANGE = 64'h000000FF;
|
||||
localparam UART_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] UART_BASE = 64'h10000000;
|
||||
localparam logic [63:0] UART_RANGE = 64'h00000007;
|
||||
localparam PLIC_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] PLIC_BASE = 64'h0C000000;
|
||||
localparam logic [63:0] PLIC_RANGE = 64'h03FFFFFF;
|
||||
localparam SDC_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] SDC_BASE = 64'h00013000;
|
||||
localparam logic [63:0] SDC_RANGE = 64'h0000007F;
|
||||
localparam SPI_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] SPI_BASE = 64'h10040000;
|
||||
localparam logic [63:0] SPI_RANGE = 64'h00000FFF;
|
||||
localparam logic EXT_MEM_SUPPORTED = 0;
|
||||
localparam logic [63:0] EXT_MEM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] EXT_MEM_RANGE = 64'h07FFFFFF;
|
||||
localparam logic CLINT_SUPPORTED = 1;
|
||||
localparam logic [63:0] CLINT_BASE = 64'h02000000;
|
||||
localparam logic [63:0] CLINT_RANGE = 64'h0000FFFF;
|
||||
localparam logic GPIO_SUPPORTED = 1;
|
||||
localparam logic [63:0] GPIO_BASE = 64'h10060000;
|
||||
localparam logic [63:0] GPIO_RANGE = 64'h000000FF;
|
||||
localparam logic UART_SUPPORTED = 1;
|
||||
localparam logic [63:0] UART_BASE = 64'h10000000;
|
||||
localparam logic [63:0] UART_RANGE = 64'h00000007;
|
||||
localparam logic PLIC_SUPPORTED = 1;
|
||||
localparam logic [63:0] PLIC_BASE = 64'h0C000000;
|
||||
localparam logic [63:0] PLIC_RANGE = 64'h03FFFFFF;
|
||||
localparam logic SDC_SUPPORTED = 0;
|
||||
localparam logic [63:0] SDC_BASE = 64'h00013000;
|
||||
localparam logic [63:0] SDC_RANGE = 64'h0000007F;
|
||||
localparam logic SPI_SUPPORTED = 1;
|
||||
localparam logic [63:0] SPI_BASE = 64'h10040000;
|
||||
localparam logic [63:0] SPI_RANGE = 64'h00000FFF;
|
||||
|
||||
// Bus Interface width
|
||||
localparam AHBW = 32'd32;
|
||||
localparam AHBW = (XLEN);
|
||||
|
||||
// Test modes
|
||||
|
||||
// AHB
|
||||
localparam RAM_LATENCY = 32'b0;
|
||||
localparam BURST_EN = 1;
|
||||
localparam logic BURST_EN = 1;
|
||||
|
||||
// Tie GPIO outputs back to inputs
|
||||
localparam GPIO_LOOPBACK_TEST = 1;
|
||||
localparam SPI_LOOPBACK_TEST = 1;
|
||||
localparam logic GPIO_LOOPBACK_TEST = 1;
|
||||
localparam logic SPI_LOOPBACK_TEST = 1;
|
||||
|
||||
// Hardware configuration
|
||||
localparam UART_PRESCALE = 32'd1;
|
||||
@ -208,7 +209,7 @@ localparam PLIC_SPI_ID = 32'd6;
|
||||
localparam PLIC_SDC_ID = 32'd9;
|
||||
|
||||
// Branch prediction
|
||||
localparam BPRED_SUPPORTED = 0;
|
||||
localparam logic BPRED_SUPPORTED = 0;
|
||||
localparam BPRED_TYPE = `BP_GSHARE; // BP_GSHARE_BASIC, BP_GLOBAL, BP_GLOBAL_BASIC, BP_TWOBIT
|
||||
localparam BPRED_SIZE = 32'd10;
|
||||
localparam BPRED_NUM_LHR = 32'd6;
|
||||
@ -217,10 +218,10 @@ localparam RAS_SIZE = 32'd16;
|
||||
localparam INSTR_CLASS_PRED = 0;
|
||||
|
||||
// FPU division architecture
|
||||
localparam RADIX = 32'h4;
|
||||
localparam DIVCOPIES = 32'h4;
|
||||
localparam RADIX = 32'd4;
|
||||
localparam DIVCOPIES = 32'd4;
|
||||
|
||||
// Memory synthesis configuration
|
||||
localparam USE_SRAM = 0;
|
||||
localparam logic USE_SRAM = 0;
|
||||
|
||||
`include "config-shared.vh"
|
||||
|
@ -2,10 +2,10 @@
|
||||
// config.vh
|
||||
//
|
||||
// Written: David_Harris@hmc.edu 4 January 2021
|
||||
// Modified:
|
||||
// Modified: Jordan Carlin jcarlin@hmc.edu 14 May 2024
|
||||
//
|
||||
// Purpose: Specify which features are configured
|
||||
// Macros to determine which modes are supported based on MISA
|
||||
// Purpose: Specify which features of Wally are enabled and set
|
||||
// configuration parameters
|
||||
//
|
||||
// A component of the Wally configurable RISC-V project.
|
||||
//
|
||||
@ -35,85 +35,85 @@ localparam IEEE754 = 0;
|
||||
|
||||
// RISC-V configuration per specification
|
||||
// Base instruction set (defaults to I if E is not supported)
|
||||
localparam E_SUPPORTED = 0;
|
||||
localparam logic E_SUPPORTED = 0;
|
||||
|
||||
// Integer instruction set extensions
|
||||
localparam ZIFENCEI_SUPPORTED = 1; // Instruction-Fetch fence
|
||||
localparam ZICSR_SUPPORTED = 1; // CSR Instructions
|
||||
localparam ZICCLSM_SUPPORTED = 1; // Misaligned loads/stores
|
||||
localparam ZICOND_SUPPORTED = 1; // Integer conditional operations
|
||||
localparam logic ZIFENCEI_SUPPORTED = 1; // Instruction-Fetch fence
|
||||
localparam logic ZICSR_SUPPORTED = 1; // CSR Instructions
|
||||
localparam logic ZICCLSM_SUPPORTED = 1; // Misaligned loads/stores
|
||||
localparam logic ZICOND_SUPPORTED = 1; // Integer conditional operations
|
||||
|
||||
// Multiplication & division extensions
|
||||
localparam M_SUPPORTED = 1;
|
||||
localparam ZMMUL_SUPPORTED= 0;
|
||||
localparam logic M_SUPPORTED = 1;
|
||||
localparam logic ZMMUL_SUPPORTED = 0;
|
||||
|
||||
// Atomic extensions
|
||||
// A extension is Zaamo + Zalrsc
|
||||
localparam ZAAMO_SUPPORTED = 1;
|
||||
localparam ZALRSC_SUPPORTED = 1;
|
||||
localparam logic ZAAMO_SUPPORTED = 1;
|
||||
localparam logic ZALRSC_SUPPORTED = 1;
|
||||
|
||||
// Bit manipulation extensions
|
||||
// B extension is Zba + Zbb + Zbs
|
||||
localparam ZBA_SUPPORTED = 1;
|
||||
localparam ZBB_SUPPORTED = 1;
|
||||
localparam ZBS_SUPPORTED = 1;
|
||||
localparam ZBC_SUPPORTED = 1;
|
||||
localparam logic ZBA_SUPPORTED = 1;
|
||||
localparam logic ZBB_SUPPORTED = 1;
|
||||
localparam logic ZBS_SUPPORTED = 1;
|
||||
localparam logic ZBC_SUPPORTED = 1;
|
||||
|
||||
// Scalar crypto extensions
|
||||
// Zkn is all 6
|
||||
localparam ZBKB_SUPPORTED = 1;
|
||||
localparam ZBKC_SUPPORTED = 1;
|
||||
localparam ZBKX_SUPPORTED = 1;
|
||||
localparam ZKND_SUPPORTED = 1;
|
||||
localparam ZKNE_SUPPORTED = 1;
|
||||
localparam ZKNH_SUPPORTED = 1;
|
||||
// Zkn is all 6 of these
|
||||
localparam logic ZBKB_SUPPORTED = 1;
|
||||
localparam logic ZBKC_SUPPORTED = 1;
|
||||
localparam logic ZBKX_SUPPORTED = 1;
|
||||
localparam logic ZKND_SUPPORTED = 1;
|
||||
localparam logic ZKNE_SUPPORTED = 1;
|
||||
localparam logic ZKNH_SUPPORTED = 1;
|
||||
|
||||
// Compressed extensions
|
||||
// C extension is Zca + Zcf (if RV32 and F supported) + Zcd (if D supported)
|
||||
// All compressed extensions require Zca
|
||||
localparam ZCA_SUPPORTED = 1;
|
||||
localparam ZCB_SUPPORTED = 1;
|
||||
localparam ZCF_SUPPORTED = 0; // RV32 only, requires F
|
||||
localparam ZCD_SUPPORTED = 1; // requires D
|
||||
localparam logic ZCA_SUPPORTED = 1;
|
||||
localparam logic ZCB_SUPPORTED = 1;
|
||||
localparam logic ZCF_SUPPORTED = 0; // RV32 only, requires F
|
||||
localparam logic ZCD_SUPPORTED = 1; // requires D
|
||||
|
||||
// Floating point extensions
|
||||
localparam F_SUPPORTED = 1;
|
||||
localparam D_SUPPORTED = 1;
|
||||
localparam Q_SUPPORTED = 0;
|
||||
localparam ZFH_SUPPORTED = 1;
|
||||
localparam ZFA_SUPPORTED = 1;
|
||||
localparam logic F_SUPPORTED = 1;
|
||||
localparam logic D_SUPPORTED = 1;
|
||||
localparam logic Q_SUPPORTED = 0;
|
||||
localparam logic ZFH_SUPPORTED = 1;
|
||||
localparam logic ZFA_SUPPORTED = 1;
|
||||
|
||||
// privilege modes
|
||||
localparam S_SUPPORTED = 1; // Supervisor mode
|
||||
localparam U_SUPPORTED = 1; // User mode
|
||||
localparam logic S_SUPPORTED = 1; // Supervisor mode
|
||||
localparam logic U_SUPPORTED = 1; // User mode
|
||||
|
||||
// Supervisor level extensions
|
||||
localparam SSTC_SUPPORTED = 1; // Supervisor-mode timer interrupts
|
||||
localparam logic SSTC_SUPPORTED = 1; // Supervisor-mode timer interrupts
|
||||
|
||||
// Hardware performance counters
|
||||
localparam ZICNTR_SUPPORTED = 1;
|
||||
localparam ZIHPM_SUPPORTED = 1;
|
||||
localparam logic ZICNTR_SUPPORTED = 1;
|
||||
localparam logic ZIHPM_SUPPORTED = 1;
|
||||
localparam COUNTERS = 12'd32;
|
||||
|
||||
// Cache-management operation extensions
|
||||
localparam ZICBOM_SUPPORTED = 1;
|
||||
localparam ZICBOZ_SUPPORTED = 1;
|
||||
localparam ZICBOP_SUPPORTED = 1;
|
||||
localparam logic ZICBOM_SUPPORTED = 1;
|
||||
localparam logic ZICBOZ_SUPPORTED = 1;
|
||||
localparam logic ZICBOP_SUPPORTED = 1;
|
||||
|
||||
// Virtual memory extensions
|
||||
localparam SVPBMT_SUPPORTED = 1;
|
||||
localparam SVNAPOT_SUPPORTED = 1;
|
||||
localparam SVINVAL_SUPPORTED = 1;
|
||||
localparam SVADU_SUPPORTED = 1;
|
||||
localparam logic SVPBMT_SUPPORTED = 1;
|
||||
localparam logic SVNAPOT_SUPPORTED = 1;
|
||||
localparam logic SVINVAL_SUPPORTED = 1;
|
||||
localparam logic SVADU_SUPPORTED = 1;
|
||||
|
||||
|
||||
// LSU microarchitectural Features
|
||||
localparam BUS_SUPPORTED = 1;
|
||||
localparam DCACHE_SUPPORTED = 1;
|
||||
localparam ICACHE_SUPPORTED = 1;
|
||||
localparam VIRTMEM_SUPPORTED = 1;
|
||||
localparam VECTORED_INTERRUPTS_SUPPORTED = 1;
|
||||
localparam BIGENDIAN_SUPPORTED = 1;
|
||||
localparam logic BUS_SUPPORTED = 1;
|
||||
localparam logic DCACHE_SUPPORTED = 1;
|
||||
localparam logic ICACHE_SUPPORTED = 1;
|
||||
localparam logic VIRTMEM_SUPPORTED = 1;
|
||||
localparam logic VECTORED_INTERRUPTS_SUPPORTED = 1;
|
||||
localparam logic BIGENDIAN_SUPPORTED = 1;
|
||||
|
||||
// TLB configuration. Entries should be a power of 2
|
||||
localparam ITLB_ENTRIES = 32'd32;
|
||||
@ -132,7 +132,7 @@ localparam CACHE_SRAMLEN = 32'd128;
|
||||
// Integer Divider Configuration
|
||||
// IDIV_BITSPERCYCLE must be 1, 2, or 4
|
||||
localparam IDIV_BITSPERCYCLE = 32'd4;
|
||||
localparam IDIV_ON_FPU = 1;
|
||||
localparam logic IDIV_ON_FPU = 1;
|
||||
|
||||
// Legal number of PMP entries are 0, 16, or 64
|
||||
localparam PMP_ENTRIES = 32'd16;
|
||||
@ -140,62 +140,61 @@ localparam PMP_ENTRIES = 32'd16;
|
||||
// Address space
|
||||
localparam logic [63:0] RESET_VECTOR = 64'h0000000080000000;
|
||||
|
||||
// Bus Interface width
|
||||
localparam AHBW = 32'd64;
|
||||
|
||||
// WFI Timeout Wait
|
||||
localparam WFI_TIMEOUT_BIT = 32'd16;
|
||||
|
||||
// Peripheral Physical Addresses
|
||||
// Peripheral memory space extends from BASE to BASE+RANGE
|
||||
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
|
||||
|
||||
// *** each of these is `PA_BITS wide. is this paramaterizable INSIDE the config file?
|
||||
localparam DTIM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] DTIM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] DTIM_RANGE = 64'h007FFFFF;
|
||||
localparam IROM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] IROM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] IROM_RANGE = 64'h007FFFFF;
|
||||
localparam BOOTROM_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] BOOTROM_BASE = 64'h00001000; // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder;
|
||||
localparam logic [63:0] BOOTROM_RANGE = 64'h00000FFF;
|
||||
localparam logic DTIM_SUPPORTED = 0;
|
||||
localparam logic [63:0] DTIM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] DTIM_RANGE = 64'h007FFFFF;
|
||||
localparam logic IROM_SUPPORTED = 0;
|
||||
localparam logic [63:0] IROM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] IROM_RANGE = 64'h007FFFFF;
|
||||
localparam logic BOOTROM_SUPPORTED = 1;
|
||||
localparam logic [63:0] BOOTROM_BASE = 64'h00001000;
|
||||
localparam logic [63:0] BOOTROM_RANGE = 64'h00000FFF;
|
||||
localparam BOOTROM_PRELOAD = 1'b0;
|
||||
localparam UNCORE_RAM_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] UNCORE_RAM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] UNCORE_RAM_RANGE = 64'h07FFFFFF;
|
||||
localparam logic UNCORE_RAM_SUPPORTED = 1;
|
||||
localparam logic [63:0] UNCORE_RAM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] UNCORE_RAM_RANGE = 64'h07FFFFFF;
|
||||
localparam UNCORE_RAM_PRELOAD = 1'b0;
|
||||
localparam EXT_MEM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] EXT_MEM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] EXT_MEM_RANGE = 64'h07FFFFFF;
|
||||
localparam CLINT_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] CLINT_BASE = 64'h02000000;
|
||||
localparam logic [63:0] CLINT_RANGE = 64'h0000FFFF;
|
||||
localparam GPIO_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] GPIO_BASE = 64'h10060000;
|
||||
localparam logic [63:0] GPIO_RANGE = 64'h000000FF;
|
||||
localparam UART_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] UART_BASE = 64'h10000000;
|
||||
localparam logic [63:0] UART_RANGE = 64'h00000007;
|
||||
localparam PLIC_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] PLIC_BASE = 64'h0C000000;
|
||||
localparam logic [63:0] PLIC_RANGE = 64'h03FFFFFF;
|
||||
localparam SDC_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] SDC_BASE = 64'h00013000;
|
||||
localparam logic [63:0] SDC_RANGE = 64'h0000007F;
|
||||
localparam SPI_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] SPI_BASE = 64'h10040000;
|
||||
localparam logic [63:0] SPI_RANGE = 64'h00000FFF;
|
||||
localparam logic EXT_MEM_SUPPORTED = 0;
|
||||
localparam logic [63:0] EXT_MEM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] EXT_MEM_RANGE = 64'h07FFFFFF;
|
||||
localparam logic CLINT_SUPPORTED = 1;
|
||||
localparam logic [63:0] CLINT_BASE = 64'h02000000;
|
||||
localparam logic [63:0] CLINT_RANGE = 64'h0000FFFF;
|
||||
localparam logic GPIO_SUPPORTED = 1;
|
||||
localparam logic [63:0] GPIO_BASE = 64'h10060000;
|
||||
localparam logic [63:0] GPIO_RANGE = 64'h000000FF;
|
||||
localparam logic UART_SUPPORTED = 1;
|
||||
localparam logic [63:0] UART_BASE = 64'h10000000;
|
||||
localparam logic [63:0] UART_RANGE = 64'h00000007;
|
||||
localparam logic PLIC_SUPPORTED = 1;
|
||||
localparam logic [63:0] PLIC_BASE = 64'h0C000000;
|
||||
localparam logic [63:0] PLIC_RANGE = 64'h03FFFFFF;
|
||||
localparam logic SDC_SUPPORTED = 0;
|
||||
localparam logic [63:0] SDC_BASE = 64'h00013000;
|
||||
localparam logic [63:0] SDC_RANGE = 64'h0000007F;
|
||||
localparam logic SPI_SUPPORTED = 1;
|
||||
localparam logic [63:0] SPI_BASE = 64'h10040000;
|
||||
localparam logic [63:0] SPI_RANGE = 64'h00000FFF;
|
||||
|
||||
// Bus Interface width
|
||||
localparam AHBW = (XLEN);
|
||||
|
||||
// Test modes
|
||||
|
||||
// AHB
|
||||
localparam RAM_LATENCY = 32'b0;
|
||||
localparam BURST_EN = 1;
|
||||
localparam logic BURST_EN = 1;
|
||||
|
||||
// Tie GPIO outputs back to inputs
|
||||
localparam GPIO_LOOPBACK_TEST = 1;
|
||||
localparam SPI_LOOPBACK_TEST = 1;
|
||||
localparam logic GPIO_LOOPBACK_TEST = 1;
|
||||
localparam logic SPI_LOOPBACK_TEST = 1;
|
||||
|
||||
// Hardware configuration
|
||||
localparam UART_PRESCALE = 32'd1;
|
||||
@ -210,19 +209,19 @@ localparam PLIC_SPI_ID = 32'd6;
|
||||
localparam PLIC_SDC_ID = 32'd9;
|
||||
|
||||
// Branch prediction
|
||||
localparam BPRED_SUPPORTED = 1;
|
||||
localparam logic BPRED_SUPPORTED = 1;
|
||||
localparam BPRED_TYPE = `BP_GSHARE; // BP_GSHARE_BASIC, BP_GLOBAL, BP_GLOBAL_BASIC, BP_TWOBIT
|
||||
localparam BPRED_NUM_LHR = 32'd6;
|
||||
localparam BPRED_SIZE = 32'd10;
|
||||
localparam BPRED_NUM_LHR = 32'd6;
|
||||
localparam BTB_SIZE = 32'd10;
|
||||
localparam RAS_SIZE = 32'd16;
|
||||
localparam INSTR_CLASS_PRED = 1;
|
||||
|
||||
// FPU division architecture
|
||||
localparam RADIX = 32'h4;
|
||||
localparam DIVCOPIES = 32'h4;
|
||||
localparam RADIX = 32'd4;
|
||||
localparam DIVCOPIES = 32'd4;
|
||||
|
||||
// Memory synthesis configuration
|
||||
localparam USE_SRAM = 0;
|
||||
localparam logic USE_SRAM = 0;
|
||||
|
||||
`include "config-shared.vh"
|
||||
|
@ -2,10 +2,10 @@
|
||||
// config.vh
|
||||
//
|
||||
// Written: David_Harris@hmc.edu 4 January 2021
|
||||
// Modified:
|
||||
// Modified: Jordan Carlin jcarlin@hmc.edu 14 May 2024
|
||||
//
|
||||
// Purpose: Specify which features are configured
|
||||
// Macros to determine which modes are supported based on MISA
|
||||
// Purpose: Specify which features of Wally are enabled and set
|
||||
// configuration parameters
|
||||
//
|
||||
// A component of the Wally configurable RISC-V project.
|
||||
//
|
||||
@ -35,85 +35,85 @@ localparam IEEE754 = 0;
|
||||
|
||||
// RISC-V configuration per specification
|
||||
// Base instruction set (defaults to I if E is not supported)
|
||||
localparam E_SUPPORTED = 0;
|
||||
localparam logic E_SUPPORTED = 0;
|
||||
|
||||
// Integer instruction set extensions
|
||||
localparam ZIFENCEI_SUPPORTED = 0; // Instruction-Fetch fence
|
||||
localparam ZICSR_SUPPORTED = 0; // CSR Instructions
|
||||
localparam ZICCLSM_SUPPORTED = 0; // Misaligned loads/stores
|
||||
localparam ZICOND_SUPPORTED = 0; // Integer conditional operations
|
||||
localparam logic ZIFENCEI_SUPPORTED = 0; // Instruction-Fetch fence
|
||||
localparam logic ZICSR_SUPPORTED = 0; // CSR Instructions
|
||||
localparam logic ZICCLSM_SUPPORTED = 0; // Misaligned loads/stores
|
||||
localparam logic ZICOND_SUPPORTED = 0; // Integer conditional operations
|
||||
|
||||
// Multiplication & division extensions
|
||||
localparam M_SUPPORTED = 0;
|
||||
localparam ZMMUL_SUPPORTED= 0;
|
||||
localparam logic M_SUPPORTED = 0;
|
||||
localparam logic ZMMUL_SUPPORTED = 0;
|
||||
|
||||
// Atomic extensions
|
||||
// A extension is Zaamo + Zalrsc
|
||||
localparam ZAAMO_SUPPORTED = 0;
|
||||
localparam ZALRSC_SUPPORTED = 0;
|
||||
localparam logic ZAAMO_SUPPORTED = 0;
|
||||
localparam logic ZALRSC_SUPPORTED = 0;
|
||||
|
||||
// Bit manipulation extensions
|
||||
// B extension is Zba + Zbb + Zbs
|
||||
localparam ZBA_SUPPORTED = 0;
|
||||
localparam ZBB_SUPPORTED = 0;
|
||||
localparam ZBS_SUPPORTED = 0;
|
||||
localparam ZBC_SUPPORTED = 0;
|
||||
localparam logic ZBA_SUPPORTED = 0;
|
||||
localparam logic ZBB_SUPPORTED = 0;
|
||||
localparam logic ZBS_SUPPORTED = 0;
|
||||
localparam logic ZBC_SUPPORTED = 0;
|
||||
|
||||
// Scalar crypto extensions
|
||||
// Zkn is all 6
|
||||
localparam ZBKB_SUPPORTED = 0;
|
||||
localparam ZBKC_SUPPORTED = 0;
|
||||
localparam ZBKX_SUPPORTED = 0;
|
||||
localparam ZKND_SUPPORTED = 0;
|
||||
localparam ZKNE_SUPPORTED = 0;
|
||||
localparam ZKNH_SUPPORTED = 0;
|
||||
// Zkn is all 6 of these
|
||||
localparam logic ZBKB_SUPPORTED = 0;
|
||||
localparam logic ZBKC_SUPPORTED = 0;
|
||||
localparam logic ZBKX_SUPPORTED = 0;
|
||||
localparam logic ZKND_SUPPORTED = 0;
|
||||
localparam logic ZKNE_SUPPORTED = 0;
|
||||
localparam logic ZKNH_SUPPORTED = 0;
|
||||
|
||||
// Compressed extensions
|
||||
// C extension is Zca + Zcf (if RV32 and F supported) + Zcd (if D supported)
|
||||
// All compressed extensions require Zca
|
||||
localparam ZCA_SUPPORTED = 0;
|
||||
localparam ZCB_SUPPORTED = 0;
|
||||
localparam ZCF_SUPPORTED = 0; // RV32 only, requires F
|
||||
localparam ZCD_SUPPORTED = 0; // requires D
|
||||
localparam logic ZCA_SUPPORTED = 0;
|
||||
localparam logic ZCB_SUPPORTED = 0;
|
||||
localparam logic ZCF_SUPPORTED = 0; // RV32 only, requires F
|
||||
localparam logic ZCD_SUPPORTED = 0; // requires D
|
||||
|
||||
// Floating point extensions
|
||||
localparam F_SUPPORTED = 0;
|
||||
localparam D_SUPPORTED = 0;
|
||||
localparam Q_SUPPORTED = 0;
|
||||
localparam ZFH_SUPPORTED = 0;
|
||||
localparam ZFA_SUPPORTED = 0;
|
||||
localparam logic F_SUPPORTED = 0;
|
||||
localparam logic D_SUPPORTED = 0;
|
||||
localparam logic Q_SUPPORTED = 0;
|
||||
localparam logic ZFH_SUPPORTED = 0;
|
||||
localparam logic ZFA_SUPPORTED = 0;
|
||||
|
||||
// privilege modes
|
||||
localparam S_SUPPORTED = 0; // Supervisor mode
|
||||
localparam U_SUPPORTED = 0; // User mode
|
||||
localparam logic S_SUPPORTED = 0; // Supervisor mode
|
||||
localparam logic U_SUPPORTED = 0; // User mode
|
||||
|
||||
// Supervisor level extensions
|
||||
localparam SSTC_SUPPORTED = 0; // Supervisor-mode timer interrupts
|
||||
localparam logic SSTC_SUPPORTED = 0; // Supervisor-mode timer interrupts
|
||||
|
||||
// Hardware performance counters
|
||||
localparam ZICNTR_SUPPORTED = 0;
|
||||
localparam ZIHPM_SUPPORTED = 0;
|
||||
localparam COUNTERS = 0;
|
||||
localparam logic ZICNTR_SUPPORTED = 0;
|
||||
localparam logic ZIHPM_SUPPORTED = 0;
|
||||
localparam COUNTERS = 12'd0;
|
||||
|
||||
// Cache-management operation extensions
|
||||
localparam ZICBOM_SUPPORTED = 0;
|
||||
localparam ZICBOZ_SUPPORTED = 0;
|
||||
localparam ZICBOP_SUPPORTED = 0;
|
||||
localparam logic ZICBOM_SUPPORTED = 0;
|
||||
localparam logic ZICBOZ_SUPPORTED = 0;
|
||||
localparam logic ZICBOP_SUPPORTED = 0;
|
||||
|
||||
// Virtual memory extensions
|
||||
localparam SVPBMT_SUPPORTED = 0;
|
||||
localparam SVNAPOT_SUPPORTED = 0;
|
||||
localparam SVINVAL_SUPPORTED = 0;
|
||||
localparam SVADU_SUPPORTED = 0;
|
||||
localparam logic SVPBMT_SUPPORTED = 0;
|
||||
localparam logic SVNAPOT_SUPPORTED = 0;
|
||||
localparam logic SVINVAL_SUPPORTED = 0;
|
||||
localparam logic SVADU_SUPPORTED = 0;
|
||||
|
||||
|
||||
// LSU microarchitectural Features
|
||||
localparam BUS_SUPPORTED = 0;
|
||||
localparam DCACHE_SUPPORTED = 0;
|
||||
localparam ICACHE_SUPPORTED = 0;
|
||||
localparam VIRTMEM_SUPPORTED = 0;
|
||||
localparam VECTORED_INTERRUPTS_SUPPORTED = 1;
|
||||
localparam BIGENDIAN_SUPPORTED = 0;
|
||||
localparam logic BUS_SUPPORTED = 0;
|
||||
localparam logic DCACHE_SUPPORTED = 0;
|
||||
localparam logic ICACHE_SUPPORTED = 0;
|
||||
localparam logic VIRTMEM_SUPPORTED = 0;
|
||||
localparam logic VECTORED_INTERRUPTS_SUPPORTED = 1;
|
||||
localparam logic BIGENDIAN_SUPPORTED = 0;
|
||||
|
||||
// TLB configuration. Entries should be a power of 2
|
||||
localparam ITLB_ENTRIES = 32'd0;
|
||||
@ -132,7 +132,7 @@ localparam CACHE_SRAMLEN = 32'd128;
|
||||
// Integer Divider Configuration
|
||||
// IDIV_BITSPERCYCLE must be 1, 2, or 4
|
||||
localparam IDIV_BITSPERCYCLE = 32'd4;
|
||||
localparam IDIV_ON_FPU = 0;
|
||||
localparam logic IDIV_ON_FPU = 0;
|
||||
|
||||
// Legal number of PMP entries are 0, 16, or 64
|
||||
localparam PMP_ENTRIES = 32'd0;
|
||||
@ -140,62 +140,61 @@ localparam PMP_ENTRIES = 32'd0;
|
||||
// Address space
|
||||
localparam logic [63:0] RESET_VECTOR = 64'h0000000080000000;
|
||||
|
||||
// Bus Interface width
|
||||
localparam AHBW = (XLEN);
|
||||
|
||||
// WFI Timeout Wait
|
||||
localparam WFI_TIMEOUT_BIT = 32'd16;
|
||||
|
||||
// Peripheral Physiccal Addresses
|
||||
// Peripheral Physical Addresses
|
||||
// Peripheral memory space extends from BASE to BASE+RANGE
|
||||
// Range should be a thermometer code with 0's in the upper bits and 1s in the lower bits
|
||||
|
||||
// *** each of these is `PA_BITS wide. is this paramaterizable INSIDE the config file?
|
||||
localparam DTIM_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] DTIM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] DTIM_RANGE = 64'h007FFFFF;
|
||||
localparam IROM_SUPPORTED = 1'b1;
|
||||
localparam logic [63:0] IROM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] IROM_RANGE = 64'h007FFFFF;
|
||||
localparam BOOTROM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] BOOTROM_BASE = 64'h00001000; // spec had been 0x1000 to 0x2FFF, but dh truncated to 0x1000 to 0x1FFF because upper half seems to be all zeros and this is easier for decoder
|
||||
localparam logic [63:0] BOOTROM_RANGE = 64'h00000FFF;
|
||||
localparam logic DTIM_SUPPORTED = 1;
|
||||
localparam logic [63:0] DTIM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] DTIM_RANGE = 64'h007FFFFF;
|
||||
localparam logic IROM_SUPPORTED = 1;
|
||||
localparam logic [63:0] IROM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] IROM_RANGE = 64'h007FFFFF;
|
||||
localparam logic BOOTROM_SUPPORTED = 0;
|
||||
localparam logic [63:0] BOOTROM_BASE = 64'h00001000;
|
||||
localparam logic [63:0] BOOTROM_RANGE = 64'h00000FFF;
|
||||
localparam BOOTROM_PRELOAD = 1'b0;
|
||||
localparam UNCORE_RAM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] UNCORE_RAM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] UNCORE_RAM_RANGE = 64'h07FFFFFF;
|
||||
localparam logic UNCORE_RAM_SUPPORTED = 0;
|
||||
localparam logic [63:0] UNCORE_RAM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] UNCORE_RAM_RANGE = 64'h07FFFFFF;
|
||||
localparam UNCORE_RAM_PRELOAD = 1'b0;
|
||||
localparam EXT_MEM_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] EXT_MEM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] EXT_MEM_RANGE = 64'h07FFFFFF;
|
||||
localparam CLINT_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] CLINT_BASE = 64'h02000000;
|
||||
localparam logic [63:0] CLINT_RANGE = 64'h0000FFFF;
|
||||
localparam GPIO_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] GPIO_BASE = 64'h10060000;
|
||||
localparam logic [63:0] GPIO_RANGE = 64'h000000FF;
|
||||
localparam UART_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] UART_BASE = 64'h10000000;
|
||||
localparam logic [63:0] UART_RANGE = 64'h00000007;
|
||||
localparam PLIC_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] PLIC_BASE = 64'h0C000000;
|
||||
localparam logic [63:0] PLIC_RANGE = 64'h03FFFFFF;
|
||||
localparam SDC_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] SDC_BASE = 64'h00013000;
|
||||
localparam logic [63:0] SDC_RANGE = 64'h0000007F;
|
||||
localparam SPI_SUPPORTED = 1'b0;
|
||||
localparam logic [63:0] SPI_BASE = 64'h10040000;
|
||||
localparam logic [63:0] SPI_RANGE = 64'h00000FFF;
|
||||
localparam logic EXT_MEM_SUPPORTED = 0;
|
||||
localparam logic [63:0] EXT_MEM_BASE = 64'h80000000;
|
||||
localparam logic [63:0] EXT_MEM_RANGE = 64'h07FFFFFF;
|
||||
localparam logic CLINT_SUPPORTED = 0;
|
||||
localparam logic [63:0] CLINT_BASE = 64'h02000000;
|
||||
localparam logic [63:0] CLINT_RANGE = 64'h0000FFFF;
|
||||
localparam logic GPIO_SUPPORTED = 0;
|
||||
localparam logic [63:0] GPIO_BASE = 64'h10060000;
|
||||
localparam logic [63:0] GPIO_RANGE = 64'h000000FF;
|
||||
localparam logic UART_SUPPORTED = 0;
|
||||
localparam logic [63:0] UART_BASE = 64'h10000000;
|
||||
localparam logic [63:0] UART_RANGE = 64'h00000007;
|
||||
localparam logic PLIC_SUPPORTED = 0;
|
||||
localparam logic [63:0] PLIC_BASE = 64'h0C000000;
|
||||
localparam logic [63:0] PLIC_RANGE = 64'h03FFFFFF;
|
||||
localparam logic SDC_SUPPORTED = 0;
|
||||
localparam logic [63:0] SDC_BASE = 64'h00013000;
|
||||
localparam logic [63:0] SDC_RANGE = 64'h0000007F;
|
||||
localparam logic SPI_SUPPORTED = 0;
|
||||
localparam logic [63:0] SPI_BASE = 64'h10040000;
|
||||
localparam logic [63:0] SPI_RANGE = 64'h00000FFF;
|
||||
|
||||
// Bus Interface width
|
||||
localparam AHBW = (XLEN);
|
||||
|
||||
// Test modes
|
||||
|
||||
// AHB
|
||||
localparam RAM_LATENCY = 32'b0;
|
||||
localparam BURST_EN = 1;
|
||||
localparam logic BURST_EN = 1;
|
||||
|
||||
// Tie GPIO outputs back to inputs
|
||||
localparam GPIO_LOOPBACK_TEST = 1;
|
||||
localparam SPI_LOOPBACK_TEST = 1;
|
||||
localparam logic GPIO_LOOPBACK_TEST = 1;
|
||||
localparam logic SPI_LOOPBACK_TEST = 1;
|
||||
|
||||
// Hardware configuration
|
||||
localparam UART_PRESCALE = 32'd1;
|
||||
@ -210,7 +209,7 @@ localparam PLIC_SPI_ID = 32'd6;
|
||||
localparam PLIC_SDC_ID = 32'd9;
|
||||
|
||||
// Branch prediction
|
||||
localparam BPRED_SUPPORTED = 0;
|
||||
localparam logic BPRED_SUPPORTED = 0;
|
||||
localparam BPRED_TYPE = `BP_GSHARE; // BP_GSHARE_BASIC, BP_GLOBAL, BP_GLOBAL_BASIC, BP_TWOBIT
|
||||
localparam BPRED_SIZE = 32'd10;
|
||||
localparam BPRED_NUM_LHR = 32'd6;
|
||||
@ -219,10 +218,10 @@ localparam RAS_SIZE = 32'd16;
|
||||
localparam INSTR_CLASS_PRED = 0;
|
||||
|
||||
// FPU division architecture
|
||||
localparam RADIX = 32'h4;
|
||||
localparam DIVCOPIES = 32'h4;
|
||||
localparam RADIX = 32'd4;
|
||||
localparam DIVCOPIES = 32'd4;
|
||||
|
||||
// Memory synthesis configuration
|
||||
localparam USE_SRAM = 0;
|
||||
localparam logic USE_SRAM = 0;
|
||||
|
||||
`include "config-shared.vh"
|
||||
|
@ -24,14 +24,15 @@ localparam SV39 = 4'd8;
|
||||
localparam SV48 = 4'd9;
|
||||
|
||||
// macros to define supported modes
|
||||
localparam I_SUPPORTED = (!E_SUPPORTED);
|
||||
localparam A_SUPPORTED = (ZAAMO_SUPPORTED && ZALRSC_SUPPORTED);
|
||||
localparam B_SUPPORTED = ((ZBA_SUPPORTED && ZBB_SUPPORTED && ZBS_SUPPORTED));
|
||||
localparam C_SUPPORTED = ZCA_SUPPORTED && (D_SUPPORTED ? ZCD_SUPPORTED : 1) && (F_SUPPORTED ? ((XLEN == 32) ? ZCF_SUPPORTED : 1) : 1);
|
||||
localparam ZKN_SUPPORTED = (ZBKB_SUPPORTED && ZBKC_SUPPORTED && ZBKX_SUPPORTED && ZKND_SUPPORTED && ZKNE_SUPPORTED && ZKNH_SUPPORTED);
|
||||
localparam logic I_SUPPORTED = (!E_SUPPORTED);
|
||||
localparam logic A_SUPPORTED = (ZAAMO_SUPPORTED & ZALRSC_SUPPORTED);
|
||||
localparam logic B_SUPPORTED = ((ZBA_SUPPORTED & ZBB_SUPPORTED & ZBS_SUPPORTED));
|
||||
localparam logic C_SUPPORTED = ZCA_SUPPORTED & (D_SUPPORTED ? ZCD_SUPPORTED : 1) & (F_SUPPORTED ? ((XLEN == 32) ? ZCF_SUPPORTED : 1) : 1);
|
||||
localparam logic ZKN_SUPPORTED = (ZBKB_SUPPORTED & ZBKC_SUPPORTED & ZBKX_SUPPORTED & ZKND_SUPPORTED & ZKNE_SUPPORTED & ZKNH_SUPPORTED);
|
||||
|
||||
// Configure MISA based on supported extensions
|
||||
localparam MISA = {6'b0, 5'b0, U_SUPPORTED[0], 1'b0, S_SUPPORTED[0], 1'b0, Q_SUPPORTED[0], 3'b0, M_SUPPORTED[0], 3'b0, I_SUPPORTED[0], 2'b0, F_SUPPORTED[0], E_SUPPORTED[0], D_SUPPORTED[0], C_SUPPORTED[0], B_SUPPORTED[0], A_SUPPORTED[0]};
|
||||
localparam MISA = {6'b0, 5'b0, U_SUPPORTED, 1'b0, S_SUPPORTED, 1'b0, Q_SUPPORTED, 3'b0, M_SUPPORTED, 3'b0, I_SUPPORTED, 2'b0,
|
||||
F_SUPPORTED, E_SUPPORTED, D_SUPPORTED, C_SUPPORTED, B_SUPPORTED, A_SUPPORTED};
|
||||
|
||||
// logarithm of XLEN, used for number of index bits to select
|
||||
localparam LOG_XLEN = (XLEN == 32 ? 32'd5 : 32'd6);
|
||||
|
Loading…
Reference in New Issue
Block a user