From 33557d22d4383bda7251fe5d5e854af6510349b7 Mon Sep 17 00:00:00 2001 From: Yvan Tortorella Date: Fri, 24 Nov 2023 11:00:29 +0100 Subject: [PATCH] Added synchronous clear for setback during recovery. --- core/cva6.sv | 3 ++- corev_apu/tb/ariane.sv | 1 + corev_apu/tb/ariane_testharness.sv | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/cva6.sv b/core/cva6.sv index d84b3b56cb..be268605f3 100644 --- a/core/cva6.sv +++ b/core/cva6.sv @@ -26,6 +26,7 @@ module cva6 import ariane_pkg::*; #( ) ( input logic clk_i, input logic rst_ni, + input logic clear_i, // Core ID, Cluster ID and boot address are considered more or less static input logic [riscv::VLEN-1:0] boot_addr_i, // reset boot address input logic [riscv::XLEN-1:0] hart_id_i, // hart id in a multicore environment (reflected in a CSR) @@ -301,7 +302,7 @@ module cva6 import ariane_pkg::*; #( if (~rst_ni) begin rst_uarch_n <= 1'b0; end else begin - rst_uarch_n <= rst_uarch_controller_n; + rst_uarch_n <= rst_uarch_controller_n | ~clear_i; end end diff --git a/corev_apu/tb/ariane.sv b/corev_apu/tb/ariane.sv index 2fc5b1751e..2ea0f66e5b 100644 --- a/corev_apu/tb/ariane.sv +++ b/corev_apu/tb/ariane.sv @@ -68,6 +68,7 @@ module ariane import ariane_pkg::*; #( ) i_cva6 ( .clk_i ( clk_i ), .rst_ni ( rst_ni ), + .clear_i ( '0 ), .boot_addr_i ( boot_addr_i ), .hart_id_i ( hart_id_i ), .irq_i ( irq_i ), diff --git a/corev_apu/tb/ariane_testharness.sv b/corev_apu/tb/ariane_testharness.sv index d8f62dba85..5fc2fd6c2a 100644 --- a/corev_apu/tb/ariane_testharness.sv +++ b/corev_apu/tb/ariane_testharness.sv @@ -845,6 +845,7 @@ module ariane_testharness #( ) i_ariane ( .clk_i ( clk_i ), .rst_ni ( ndmreset_n ), + .clear_i ( '0 ), .boot_addr_i ( ariane_soc::ROMBase ), // start fetching from ROM .hart_id_i ( {56'h0, 8'(i)} ), .irq_i ( irqs[i] ),