From f04063ec9e73da537edaa6c2ac770e38543f7225 Mon Sep 17 00:00:00 2001 From: Anton Angelov Date: Sun, 22 Mar 2026 21:16:29 +0200 Subject: [PATCH 1/3] Assign orig_instr_o if ZKN is enabled --- core/decoder.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/decoder.sv b/core/decoder.sv index 0a9fccda0f..67a9b3383a 100644 --- a/core/decoder.sv +++ b/core/decoder.sv @@ -1846,7 +1846,7 @@ module decoder if (~ex_i.valid) begin // if we didn't already get an exception save the instruction here as we may need it // in the commit stage if we got a access exception to one of the CSR registers - if (CVA6Cfg.CvxifEn || CVA6Cfg.RVF) + if (CVA6Cfg.CvxifEn || CVA6Cfg.RVF || CVA6Cfg.ZKN) orig_instr_o = (is_compressed_i) ? {{CVA6Cfg.XLEN-16{1'b0}}, compressed_instr_i} : {{CVA6Cfg.XLEN-32{1'b0}}, instruction_i}; if (CVA6Cfg.TvalEn) instruction_o.ex.tval = (is_compressed_i) ? {{CVA6Cfg.XLEN-16{1'b0}}, compressed_instr_i} : {{CVA6Cfg.XLEN-32{1'b0}}, instruction_i}; From 9334ce6576ff088525f0c42a8052f5fb9e09e7af Mon Sep 17 00:00:00 2001 From: Anton Angelov Date: Sun, 22 Mar 2026 21:25:07 +0200 Subject: [PATCH 2/3] Auto-enabled RVB if ZKN is set --- core/include/build_config_pkg.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/include/build_config_pkg.sv b/core/include/build_config_pkg.sv index 6ce8897199..c9ac655961 100644 --- a/core/include/build_config_pkg.sv +++ b/core/include/build_config_pkg.sv @@ -67,7 +67,7 @@ package build_config_pkg; cfg.XF16ALT = CVA6Cfg.XF16ALT; cfg.XF8 = CVA6Cfg.XF8; cfg.RVA = CVA6Cfg.RVA; - cfg.RVB = CVA6Cfg.RVB; + cfg.RVB = CVA6Cfg.RVB | CVA6Cfg.ZKN; // ZKN requires RVB cfg.ZKN = CVA6Cfg.ZKN; cfg.RVV = CVA6Cfg.RVV; cfg.RVC = CVA6Cfg.RVC; From f23ad6b446234785255cb4e6159e1abced3cccbf Mon Sep 17 00:00:00 2001 From: Anton Angelov Date: Mon, 23 Mar 2026 17:05:23 +0200 Subject: [PATCH 3/3] Use boolean operator --- core/include/build_config_pkg.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/include/build_config_pkg.sv b/core/include/build_config_pkg.sv index c9ac655961..938d6a3681 100644 --- a/core/include/build_config_pkg.sv +++ b/core/include/build_config_pkg.sv @@ -67,7 +67,7 @@ package build_config_pkg; cfg.XF16ALT = CVA6Cfg.XF16ALT; cfg.XF8 = CVA6Cfg.XF8; cfg.RVA = CVA6Cfg.RVA; - cfg.RVB = CVA6Cfg.RVB | CVA6Cfg.ZKN; // ZKN requires RVB + cfg.RVB = CVA6Cfg.RVB || CVA6Cfg.ZKN; // ZKN requires RVB cfg.ZKN = CVA6Cfg.ZKN; cfg.RVV = CVA6Cfg.RVV; cfg.RVC = CVA6Cfg.RVC;