diff --git a/core/controller.sv b/core/controller.sv index 95ead80d9..89c4d1c50 100644 --- a/core/controller.sv +++ b/core/controller.sv @@ -81,7 +81,7 @@ module controller import ariane_pkg::*; ( flush_ex_o = 1'b1; // this is not needed in the case since we // have a write-through cache in this case - if (DCACHE_TYPE == cva6_config_pkg::WB) begin + if (DCACHE_TYPE == int'(cva6_config_pkg::WB)) begin flush_dcache = 1'b1; fence_active_d = 1'b1; end @@ -99,7 +99,7 @@ module controller import ariane_pkg::*; ( flush_icache_o = 1'b1; // this is not needed in the case since we // have a write-through cache in this case - if (DCACHE_TYPE == cva6_config_pkg::WB) begin + if (DCACHE_TYPE == int'(cva6_config_pkg::WB)) begin flush_dcache = 1'b1; fence_active_d = 1'b1; end @@ -107,7 +107,7 @@ module controller import ariane_pkg::*; ( // this is not needed in the case since we // have a write-through cache in this case - if (DCACHE_TYPE == cva6_config_pkg::WB) begin + if (DCACHE_TYPE == int'(cva6_config_pkg::WB)) begin // wait for the acknowledge here if (flush_dcache_ack_i && fence_active_q) begin fence_active_d = 1'b0; diff --git a/core/cva6.sv b/core/cva6.sv index 622e6e44b..e7ea42daf 100644 --- a/core/cva6.sv +++ b/core/cva6.sv @@ -684,7 +684,7 @@ module cva6 import ariane_pkg::*; #( // Cache Subsystem // ------------------- - if (DCACHE_TYPE == cva6_config_pkg::WT) begin + if (DCACHE_TYPE == int'(cva6_config_pkg::WT)) begin // this is a cache subsystem that is compatible with OpenPiton wt_cache_subsystem #( .ArianeCfg ( ArianeCfg ), diff --git a/core/include/ariane_pkg.sv b/core/include/ariane_pkg.sv index 7be4370cf..b195d30cf 100644 --- a/core/include/ariane_pkg.sv +++ b/core/include/ariane_pkg.sv @@ -142,14 +142,14 @@ package ariane_pkg; // depth of store-buffers, this needs to be a power of two localparam int unsigned DEPTH_SPEC = 4; - localparam int unsigned DCACHE_TYPE = cva6_config_pkg::CVA6ConfigDcacheType; + localparam int unsigned DCACHE_TYPE = int'(cva6_config_pkg::CVA6ConfigDcacheType); // if DCACHE_TYPE = cva6_config_pkg::WT // we can use a small commit queue since we have a write buffer in the dcache // we could in principle do without the commit queue in this case, but the timing degrades if we do that due // to longer paths into the commit stage // if DCACHE_TYPE = cva6_config_pkg::WB // allocate more space for the commit buffer to be on the save side, this needs to be a power of two - localparam int unsigned DEPTH_COMMIT = (DCACHE_TYPE == cva6_config_pkg::WT) ? 4 : 8; + localparam int unsigned DEPTH_COMMIT = (DCACHE_TYPE == int'(cva6_config_pkg::WT)) ? 4 : 8; localparam bit FPGA_EN = cva6_config_pkg::CVA6ConfigFPGAEn; // Is FPGA optimization of CV32A6