From f36eb6f73dec6c0e621e584aafd3454dfd801d4e Mon Sep 17 00:00:00 2001 From: David Harris Date: Sat, 7 Sep 2024 12:05:48 -0700 Subject: [PATCH] Added support for RV64GC coverage and fixed regression so that --fcov doesn't send --lockstep flag to wsim, which messed up wsim --- bin/regression-wally | 5 ++++- .../{coverage_extensions.svh => coverage.svh} | 4 +++- config/rv64gc/coverage.svh | 13 +++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) rename config/rv32gc/{coverage_extensions.svh => coverage.svh} (82%) create mode 100644 config/rv64gc/coverage.svh diff --git a/bin/regression-wally b/bin/regression-wally index 5baf73f0f..ccbc249f9 100755 --- a/bin/regression-wally +++ b/bin/regression-wally @@ -292,7 +292,10 @@ def addTests(tests, sim): def addLockstepTestsByDir(dir, config, sim): sim_logdir = WALLY+ "/sim/" + sim + "/logs/" - cmdPrefix="wsim --lockstep --sim " + sim + " " + coverStr + " " + config + if (coverStr != ""): # use --fcov in place of --lockstep + cmdPrefix="wsim --sim " + sim + " " + coverStr + " " + config + else: + cmdPrefix="wsim --lockstep --sim " + sim + " " + config if (os.path.isdir(dir)): for dirpath, dirnames, filenames in os.walk(os.path.abspath(dir)): for file in filenames: diff --git a/config/rv32gc/coverage_extensions.svh b/config/rv32gc/coverage.svh similarity index 82% rename from config/rv32gc/coverage_extensions.svh rename to config/rv32gc/coverage.svh index 80f73c6f4..d40d78ea2 100644 --- a/config/rv32gc/coverage_extensions.svh +++ b/config/rv32gc/coverage.svh @@ -1,4 +1,4 @@ -// coverage_extensions.svh +// coverage.svh // David_Harris@hmc.edu 7 September 2024 // SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 @@ -7,5 +7,7 @@ `define COVER_RV32I `define COVER_RV32M +`define COVER_RV32F `include "coverage/RV32I_coverage.svh" `include "coverage/RV32M_coverage.svh" +`include "coverage/RV32F_coverage.svh" diff --git a/config/rv64gc/coverage.svh b/config/rv64gc/coverage.svh new file mode 100644 index 000000000..ee811e922 --- /dev/null +++ b/config/rv64gc/coverage.svh @@ -0,0 +1,13 @@ +// coverage.svh +// David_Harris@hmc.edu 7 September 2024 +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 + +// This file is needed in the config subdirectory for each config supporting coverage. +// It defines which extensions are enabled for that config. + +`define COVER_RV64I +`define COVER_RV64M +`define COVER_RV64F +`include "coverage/RV64I_coverage.svh" +`include "coverage/RV64M_coverage.svh" +`include "coverage/RV64F_coverage.svh"