moved privilege dfinitions into wally-constants, upgraded relevant includes

This commit is contained in:
Kip Macsai-Goren 2021-06-04 17:55:07 -04:00
parent 4a00fbaf04
commit b99b5f8e0e
18 changed files with 14 additions and 36 deletions

View File

@ -46,10 +46,6 @@
//`define N_SUPPORTED ((MISA >> 13) % 2 == 1) //`define N_SUPPORTED ((MISA >> 13) % 2 == 1)
`define N_SUPPORTED 0 `define N_SUPPORTED 0
`define M_MODE (2'b11)
`define S_MODE (2'b01)
`define U_MODE (2'b00)
// Microarchitectural Features // Microarchitectural Features
`define UARCH_PIPELINED 1 `define UARCH_PIPELINED 1
`define UARCH_SUPERSCALR 0 `define UARCH_SUPERSCALR 0

View File

@ -46,10 +46,6 @@
//`define N_SUPPORTED ((MISA >> 13) % 2 == 1) //`define N_SUPPORTED ((MISA >> 13) % 2 == 1)
`define N_SUPPORTED 0 `define N_SUPPORTED 0
`define M_MODE (2'b11)
`define S_MODE (2'b01)
`define U_MODE (2'b00)
// Microarchitectural Features // Microarchitectural Features
`define UARCH_PIPELINED 1 `define UARCH_PIPELINED 1
`define UARCH_SUPERSCALR 0 `define UARCH_SUPERSCALR 0

View File

@ -42,10 +42,6 @@
//`define N_SUPPORTED ((MISA >> 13) % 2 == 1) //`define N_SUPPORTED ((MISA >> 13) % 2 == 1)
`define N_SUPPORTED 0 `define N_SUPPORTED 0
`define M_MODE (2'b11)
`define S_MODE (2'b01)
`define U_MODE (2'b00)
// Microarchitectural Features // Microarchitectural Features
`define UARCH_PIPELINED 1 `define UARCH_PIPELINED 1
`define UARCH_SUPERSCALR 0 `define UARCH_SUPERSCALR 0

View File

@ -46,10 +46,6 @@
//`define N_SUPPORTED ((MISA >> 13) % 2 == 1) //`define N_SUPPORTED ((MISA >> 13) % 2 == 1)
`define N_SUPPORTED 0 `define N_SUPPORTED 0
`define M_MODE (2'b11)
`define S_MODE (2'b01)
`define U_MODE (2'b00)
// Microarchitectural Features // Microarchitectural Features
`define UARCH_PIPELINED 1 `define UARCH_PIPELINED 1
`define UARCH_SUPERSCALR 0 `define UARCH_SUPERSCALR 0

View File

@ -46,10 +46,6 @@
//`define N_SUPPORTED ((MISA >> 13) % 2 == 1) //`define N_SUPPORTED ((MISA >> 13) % 2 == 1)
`define N_SUPPORTED 0 `define N_SUPPORTED 0
`define M_MODE (2'b11)
`define S_MODE (2'b01)
`define U_MODE (2'b00)
// Microarchitectural Features // Microarchitectural Features
`define UARCH_PIPELINED 1 `define UARCH_PIPELINED 1
`define UARCH_SUPERSCALR 0 `define UARCH_SUPERSCALR 0

View File

@ -45,10 +45,6 @@
//`define N_SUPPORTED ((MISA >> 13) % 2 == 1) //`define N_SUPPORTED ((MISA >> 13) % 2 == 1)
`define N_SUPPORTED 0 `define N_SUPPORTED 0
`define M_MODE (2'b11)
`define S_MODE (2'b01)
`define U_MODE (2'b00)
// Microarchitectural Features // Microarchitectural Features
`define UARCH_PIPELINED 1 `define UARCH_PIPELINED 1
`define UARCH_SUPERSCALR 0 `define UARCH_SUPERSCALR 0

View File

@ -47,10 +47,6 @@
//`define N_SUPPORTED ((MISA >> 13) % 2 == 1) //`define N_SUPPORTED ((MISA >> 13) % 2 == 1)
`define N_SUPPORTED 0 `define N_SUPPORTED 0
`define M_MODE (2'b11)
`define S_MODE (2'b01)
`define U_MODE (2'b00)
// Microarchitectural Features // Microarchitectural Features
`define UARCH_PIPELINED 1 `define UARCH_PIPELINED 1
`define UARCH_SUPERSCALR 0 `define UARCH_SUPERSCALR 0

View File

@ -46,10 +46,6 @@
//`define N_SUPPORTED ((MISA >> 13) % 2 == 1) //`define N_SUPPORTED ((MISA >> 13) % 2 == 1)
`define N_SUPPORTED 0 `define N_SUPPORTED 0
`define M_MODE (2'b11)
`define S_MODE (2'b01)
`define U_MODE (2'b00)
// Microarchitectural Features // Microarchitectural Features
`define UARCH_PIPELINED 1 `define UARCH_PIPELINED 1
`define UARCH_SUPERSCALR 0 `define UARCH_SUPERSCALR 0

View File

@ -46,10 +46,6 @@
//`define N_SUPPORTED ((MISA >> 13) % 2 == 1) //`define N_SUPPORTED ((MISA >> 13) % 2 == 1)
`define N_SUPPORTED 0 `define N_SUPPORTED 0
`define M_MODE (2'b11)
`define S_MODE (2'b01)
`define U_MODE (2'b00)
// Microarchitectural Features // Microarchitectural Features
`define UARCH_PIPELINED 1 `define UARCH_PIPELINED 1
`define UARCH_SUPERSCALR 0 `define UARCH_SUPERSCALR 0

View File

@ -45,3 +45,9 @@
`define SV39 8 `define SV39 8
`define SV48 9 `define SV48 9
// constants defining different privilege modes
// defined in Table 1.1 of the privileged spec
`define M_MODE (2'b11)
`define S_MODE (2'b01)
`define U_MODE (2'b00)

View File

@ -27,6 +27,7 @@
/////////////////////////////////////////// ///////////////////////////////////////////
`include "wally-config.vh" `include "wally-config.vh"
`include "wally-constants.vh"
module pmpchecker ( module pmpchecker (
input logic clk, reset, input logic clk, reset,

View File

@ -26,6 +26,7 @@
/////////////////////////////////////////// ///////////////////////////////////////////
`include "wally-config.vh" `include "wally-config.vh"
`include "wally-constants.vh"
module csr #(parameter module csr #(parameter
// Constants // Constants

View File

@ -28,6 +28,7 @@
/////////////////////////////////////////// ///////////////////////////////////////////
`include "wally-config.vh" `include "wally-config.vh"
`include "wally-constants.vh"
module csrc ( module csrc (
input logic clk, reset, input logic clk, reset,

View File

@ -25,6 +25,7 @@
/////////////////////////////////////////// ///////////////////////////////////////////
`include "wally-config.vh" `include "wally-config.vh"
`include "wally-constants.vh"
module csrsr ( module csrsr (
input logic clk, reset, StallW, input logic clk, reset, StallW,

View File

@ -25,6 +25,7 @@
/////////////////////////////////////////// ///////////////////////////////////////////
`include "wally-config.vh" `include "wally-config.vh"
`include "wally-constants.vh"
module privdec ( module privdec (
input logic [31:20] InstrM, input logic [31:20] InstrM,

View File

@ -25,6 +25,7 @@
/////////////////////////////////////////// ///////////////////////////////////////////
`include "wally-config.vh" `include "wally-config.vh"
`include "wally-constants.vh"
// *** remove signals not needed by PMA/PMP now that it is moved // *** remove signals not needed by PMA/PMP now that it is moved
module privileged ( module privileged (

View File

@ -25,6 +25,7 @@
/////////////////////////////////////////// ///////////////////////////////////////////
`include "wally-config.vh" `include "wally-config.vh"
`include "wally-constants.vh"
module trap ( module trap (
input logic clk, reset, input logic clk, reset,

View File

@ -1,4 +1,5 @@
`include "wally-config.vh" `include "wally-config.vh"
`include "wally-constants.vh"
module testbench(); module testbench();