Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up parameter types. Fix for issue #676 #813

Merged
merged 2 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bhv/cv32e40x_core_log.sv
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
module cv32e40x_core_log import cv32e40x_pkg::*;
#(
// todo: log all parameters
parameter int NUM_MHPMCOUNTERS = 1,
parameter bit ENABLE = 1
parameter int unsigned NUM_MHPMCOUNTERS = 1,
parameter bit ENABLE = 1
)
(
input logic clk_i,
Expand Down
2 changes: 1 addition & 1 deletion bhv/cv32e40x_rvfi.sv
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module cv32e40x_rvfi
import cv32e40x_rvfi_pkg::*;
#(
parameter bit CLIC = 0,
parameter int DEBUG = 1,
parameter bit DEBUG = 1,
parameter a_ext_e A_EXT = A_NONE
)
(
Expand Down
18 changes: 9 additions & 9 deletions bhv/cv32e40x_wrapper.sv
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,22 @@ module cv32e40x_wrapper
parameter b_ext_e B_EXT = B_NONE,
parameter m_ext_e M_EXT = M,
parameter bit X_EXT = 0,
parameter int X_NUM_RS = 2,
parameter int X_ID_WIDTH = 4,
parameter int X_MEM_WIDTH = 32,
parameter int X_RFR_WIDTH = 32,
parameter int X_RFW_WIDTH = 32,
parameter int unsigned X_NUM_RS = 2,
parameter int unsigned X_ID_WIDTH = 4,
parameter int unsigned X_MEM_WIDTH = 32,
parameter int unsigned X_RFR_WIDTH = 32,
parameter int unsigned X_RFW_WIDTH = 32,
parameter logic [31:0] X_MISA = 32'h00000000,
parameter logic [1:0] X_ECS_XS = 2'b00,
parameter int NUM_MHPMCOUNTERS = 1,
parameter int unsigned NUM_MHPMCOUNTERS = 1,
parameter bit CLIC = 0,
parameter int CLIC_ID_WIDTH = 5,
parameter int CLIC_INTTHRESHBITS = 8,
parameter int unsigned CLIC_ID_WIDTH = 5,
parameter int unsigned CLIC_INTTHRESHBITS = 8,
parameter int DBG_NUM_TRIGGERS = 1,
parameter int PMA_NUM_REGIONS = 0,
parameter pma_cfg_t PMA_CFG[PMA_NUM_REGIONS-1:0] = '{default:PMA_R_DEFAULT},
parameter bit CORE_LOG_ENABLE = 1,
parameter int DEBUG = 1,
parameter bit DEBUG = 1,
parameter logic [31:0] DM_REGION_START = 32'hF0000000,
parameter logic [31:0] DM_REGION_END = 32'hF0003FFF
)
Expand Down
144 changes: 72 additions & 72 deletions docs/user_manual/source/integration.rst

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion rtl/cv32e40x_clic_int_controller.sv
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

module cv32e40x_clic_int_controller import cv32e40x_pkg::*;
#(
parameter int CLIC_ID_WIDTH = 5
parameter int unsigned CLIC_ID_WIDTH = 5
)
(
input logic clk,
Expand Down
4 changes: 2 additions & 2 deletions rtl/cv32e40x_controller.sv
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ module cv32e40x_controller import cv32e40x_pkg::*;
parameter a_ext_e A_EXT = A_NONE,
parameter int unsigned REGFILE_NUM_READ_PORTS = 2,
parameter bit CLIC = 0,
parameter int CLIC_ID_WIDTH = 5,
parameter int DEBUG = 1
parameter int unsigned CLIC_ID_WIDTH = 5,
parameter bit DEBUG = 1
)
(
input logic clk, // Gated clock
Expand Down
8 changes: 4 additions & 4 deletions rtl/cv32e40x_controller_fsm.sv
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@

module cv32e40x_controller_fsm import cv32e40x_pkg::*;
#(
parameter bit X_EXT = 0,
parameter int DEBUG = 1,
parameter bit CLIC = 0,
parameter int CLIC_ID_WIDTH = 5
parameter bit X_EXT = 0,
parameter bit DEBUG = 1,
parameter bit CLIC = 0,
parameter int unsigned CLIC_ID_WIDTH = 5
)
(
// Clocks and reset
Expand Down
18 changes: 9 additions & 9 deletions rtl/cv32e40x_core.sv
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@ module cv32e40x_core import cv32e40x_pkg::*;
parameter a_ext_e A_EXT = A_NONE,
parameter b_ext_e B_EXT = B_NONE,
parameter m_ext_e M_EXT = M,
parameter int DEBUG = 1,
parameter bit DEBUG = 1,
parameter logic [31:0] DM_REGION_START = 32'hF0000000,
parameter logic [31:0] DM_REGION_END = 32'hF0003FFF,
parameter int DBG_NUM_TRIGGERS = 1,
parameter int PMA_NUM_REGIONS = 0,
parameter pma_cfg_t PMA_CFG[PMA_NUM_REGIONS-1:0] = '{default:PMA_R_DEFAULT},
parameter bit CLIC = 0,
parameter int CLIC_ID_WIDTH = 5,
parameter int CLIC_INTTHRESHBITS = 8,
parameter int unsigned CLIC_ID_WIDTH = 5,
parameter int unsigned CLIC_INTTHRESHBITS = 8,
parameter bit X_EXT = 0,
parameter int X_NUM_RS = 2,
parameter int X_ID_WIDTH = 4,
parameter int X_MEM_WIDTH = 32,
parameter int X_RFR_WIDTH = 32,
parameter int X_RFW_WIDTH = 32,
parameter int unsigned X_NUM_RS = 2,
parameter int unsigned X_ID_WIDTH = 4,
parameter int unsigned X_MEM_WIDTH = 32,
parameter int unsigned X_RFR_WIDTH = 32,
parameter int unsigned X_RFW_WIDTH = 32,
parameter logic [31:0] X_MISA = 32'h00000000,
parameter logic [1:0] X_ECS_XS = 2'b00,
parameter int NUM_MHPMCOUNTERS = 1
parameter int unsigned NUM_MHPMCOUNTERS = 1
)
(
// Clock and reset
Expand Down
8 changes: 4 additions & 4 deletions rtl/cv32e40x_cs_registers.sv
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ module cv32e40x_cs_registers import cv32e40x_pkg::*;
parameter logic [1:0] X_ECS_XS = 2'b00, // todo: implement related mstatus bitfields (but only if X_EXT = 1)
parameter bit ZC_EXT = 0,
parameter bit CLIC = 0,
parameter int CLIC_ID_WIDTH = 5,
parameter int CLIC_INTTHRESHBITS = 8,
parameter int NUM_MHPMCOUNTERS = 1,
parameter int DEBUG = 1,
parameter int unsigned CLIC_ID_WIDTH = 5,
parameter int unsigned CLIC_INTTHRESHBITS = 8,
parameter int unsigned NUM_MHPMCOUNTERS = 1,
parameter bit DEBUG = 1,
parameter int DBG_NUM_TRIGGERS = 1, // todo: implement support for DBG_NUM_TRIGGERS != 1
parameter int unsigned MTVT_ADDR_WIDTH = 26
)
Expand Down
6 changes: 3 additions & 3 deletions rtl/cv32e40x_if_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ module cv32e40x_if_stage import cv32e40x_pkg::*;
parameter a_ext_e A_EXT = A_NONE,
parameter b_ext_e B_EXT = B_NONE,
parameter bit X_EXT = 0,
parameter int X_ID_WIDTH = 4,
parameter int unsigned X_ID_WIDTH = 4,
parameter int PMA_NUM_REGIONS = 0,
parameter pma_cfg_t PMA_CFG[PMA_NUM_REGIONS-1:0] = '{default:PMA_R_DEFAULT},
parameter int unsigned MTVT_ADDR_WIDTH = 26,
parameter bit CLIC = 1'b0,
parameter int CLIC_ID_WIDTH = 5,
parameter int unsigned CLIC_ID_WIDTH = 5,
parameter bit ZC_EXT = 0,
parameter m_ext_e M_EXT = M_NONE,
parameter int DEBUG = 1,
parameter bit DEBUG = 1,
parameter logic [31:0] DM_REGION_START = 32'hF0000000,
parameter logic [31:0] DM_REGION_END = 32'hF0003FFF
)
Expand Down
4 changes: 2 additions & 2 deletions rtl/cv32e40x_load_store_unit.sv
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ module cv32e40x_load_store_unit import cv32e40x_pkg::*;
#(
parameter a_ext_e A_EXT = A_NONE,
parameter bit X_EXT = 0,
parameter int X_ID_WIDTH = 4,
parameter int unsigned X_ID_WIDTH = 4,
parameter int PMA_NUM_REGIONS = 0,
parameter pma_cfg_t PMA_CFG[PMA_NUM_REGIONS-1:0] = '{default:PMA_R_DEFAULT},
parameter int DBG_NUM_TRIGGERS = 1,
parameter int DEBUG = 1,
parameter bit DEBUG = 1,
parameter logic [31:0] DM_REGION_START = 32'hF0000000,
parameter logic [31:0] DM_REGION_END = 32'hF0003FFF
)
Expand Down
2 changes: 1 addition & 1 deletion rtl/cv32e40x_mpu.sv
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module cv32e40x_mpu import cv32e40x_pkg::*;
parameter type BUS_RESP_TYPE = data_resp_t,
parameter int PMA_NUM_REGIONS = 0,
parameter pma_cfg_t PMA_CFG[PMA_NUM_REGIONS-1:0] = '{default:PMA_R_DEFAULT},
parameter int DEBUG = 1,
parameter bit DEBUG = 1,
parameter logic [31:0] DM_REGION_START = 32'hF0000000,
parameter logic [31:0] DM_REGION_END = 32'hF0003FFF)
(
Expand Down
2 changes: 1 addition & 1 deletion rtl/cv32e40x_wb_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

module cv32e40x_wb_stage import cv32e40x_pkg::*;
#(
parameter int DEBUG = 1
parameter bit DEBUG = 1
)
(
input logic clk, // Not used in RTL; only used by assertions
Expand Down
10 changes: 5 additions & 5 deletions rtl/if_xif.sv
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@

interface if_xif import cv32e40x_pkg::*;
#(
parameter int X_NUM_RS = 2, // Number of register file read ports that can be used by the eXtension interface
parameter int X_ID_WIDTH = 4, // Width of ID field.
parameter int X_MEM_WIDTH = 32, // Memory access width for loads/stores via the eXtension interface
parameter int X_RFR_WIDTH = 32, // Register file read access width for the eXtension interface
parameter int X_RFW_WIDTH = 32, // Register file write access width for the eXtension interface
parameter int unsigned X_NUM_RS = 2, // Number of register file read ports that can be used by the eXtension interface
parameter int unsigned X_ID_WIDTH = 4, // Width of ID field.
parameter int unsigned X_MEM_WIDTH = 32, // Memory access width for loads/stores via the eXtension interface
parameter int unsigned X_RFR_WIDTH = 32, // Register file read access width for the eXtension interface
parameter int unsigned X_RFW_WIDTH = 32, // Register file write access width for the eXtension interface
parameter logic [31:0] X_MISA = '0, // MISA extensions implemented on the eXtension interface
parameter logic [ 1:0] X_ECS_XS = '0 // Default value for mstatus.XS
);
Expand Down
2 changes: 1 addition & 1 deletion sva/cv32e40x_controller_fsm_sva.sv
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module cv32e40x_controller_fsm_sva
import uvm_pkg::*;
import cv32e40x_pkg::*;
#( parameter bit X_EXT = 1'b0,
parameter int DEBUG = 0,
parameter bit DEBUG = 1'b0,
parameter bit CLIC = 1'b0
)
(
Expand Down
2 changes: 1 addition & 1 deletion sva/cv32e40x_core_sva.sv
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module cv32e40x_core_sva
import cv32e40x_pkg::*;
#(
parameter a_ext_e A_EXT = A_NONE,
parameter int DEBUG = 1,
parameter bit DEBUG = 1,
parameter int PMA_NUM_REGIONS = 0,
parameter bit CLIC = 0
)
Expand Down
2 changes: 1 addition & 1 deletion sva/cv32e40x_cs_registers_sva.sv
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module cv32e40x_cs_registers_sva
import cv32e40x_pkg::*;
#(
parameter bit CLIC = 0,
parameter int DEBUG = 1
parameter bit DEBUG = 1
)

(
Expand Down
2 changes: 1 addition & 1 deletion sva/cv32e40x_decoder_sva.sv
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module cv32e40x_decoder_sva
import cv32e40x_pkg::*;
#(
parameter a_ext_e A_EXT = A_NONE,
parameter int CLIC = 0
parameter bit CLIC = 0
)
(
input logic clk,
Expand Down
2 changes: 1 addition & 1 deletion sva/cv32e40x_if_stage_sva.sv
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module cv32e40x_if_stage_sva
import uvm_pkg::*;
import cv32e40x_pkg::*;
#(
parameter int CLIC = 0
parameter bit CLIC = 0
)
(
input logic clk,
Expand Down
2 changes: 1 addition & 1 deletion sva/cv32e40x_load_store_unit_sva.sv
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module cv32e40x_load_store_unit_sva
#(
parameter bit X_EXT = 0,
parameter DEPTH = 0,
parameter int DEBUG = 1,
parameter bit DEBUG = 1,
parameter a_ext_e A_EXT = A_NONE
)
(input logic clk,
Expand Down
4 changes: 2 additions & 2 deletions sva/cv32e40x_mpu_sva.sv
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
////////////////////////////////////////////////////////////////////////////////

module cv32e40x_mpu_sva import cv32e40x_pkg::*; import uvm_pkg::*;
#( parameter int PMA_NUM_REGIONS = 0,
#( parameter int PMA_NUM_REGIONS = 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IS_INSTR_SIDE should be 'bit' (might occur in other files as well)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

parameter pma_cfg_t PMA_CFG[PMA_NUM_REGIONS-1:0] = '{default:PMA_R_DEFAULT},
parameter int unsigned IS_INSTR_SIDE = 0,
parameter type CORE_RESP_TYPE = inst_resp_t,
parameter type CORE_REQ_TYPE = obi_inst_req_t,
parameter a_ext_e A_EXT = A_NONE,
parameter int DEBUG = 1,
parameter bit DEBUG = 1,
parameter logic [31:0] DM_REGION_START = 32'hF0000000,
parameter logic [31:0] DM_REGION_END = 32'hF0003FFF)
(
Expand Down
2 changes: 1 addition & 1 deletion sva/cv32e40x_rvfi_sva.sv
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module cv32e40x_rvfi_sva
import cv32e40x_rvfi_pkg::*;
#(
parameter bit CLIC = 0,
parameter int DEBUG = 1,
parameter bit DEBUG = 1,
parameter a_ext_e A_EXT = A_NONE
)
(
Expand Down
2 changes: 1 addition & 1 deletion sva/cv32e40x_wb_stage_sva.sv
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module cv32e40x_wb_stage_sva
import uvm_pkg::*;
import cv32e40x_pkg::*;
#(
parameter int DEBUG = 1
parameter bit DEBUG = 1
)
(
input logic clk,
Expand Down
2 changes: 1 addition & 1 deletion sva/cv32e40x_write_buffer_sva.sv
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module cv32e40x_write_buffer_sva
import cv32e40x_pkg::*;
import uvm_pkg::*;
#(
parameter int PMA_NUM_REGIONS = 0,
parameter int PMA_NUM_REGIONS = 0,
parameter pma_cfg_t PMA_CFG[PMA_NUM_REGIONS-1:0] = '{default:PMA_R_DEFAULT}
)
(input logic clk,
Expand Down