From 90b5d279fd8521afe1c0d1094490c21cbb8154c3 Mon Sep 17 00:00:00 2001 From: Kevin Box Date: Wed, 5 Apr 2023 09:45:09 -0700 Subject: [PATCH 1/5] Add sfence.vma and arch64d/f tests to increase coverage in the LSU --- sim/regression-wally | 3 ++- tests/coverage/lsu.S | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 tests/coverage/lsu.S diff --git a/sim/regression-wally b/sim/regression-wally index c7017720..07613aea 100755 --- a/sim/regression-wally +++ b/sim/regression-wally @@ -136,7 +136,8 @@ tests64gc = ["arch64f", "arch64d", "arch64i", "arch64zba", "arch64zbb", "arch64z if (coverage): # delete all but 64gc tests when running coverage configs = [] # tests64gc = ["coverage64gc", "arch64f", "arch64d", "arch64i", "arch64priv", "arch64c", "arch64m", - tests64gc = ["coverage64gc", "arch64i", "arch64priv", "arch64c", "arch64m", + tests64gc = ["coverage64gc", "arch64f", "arch64d", "arch64i", "arch64priv", "arch64c", "arch64m", +# tests64gc = ["coverage64gc", "arch64i", "arch64priv", "arch64c", "arch64m", "arch64zi", "wally64a", "wally64periph", "wally64priv", "arch64zba", "arch64zbb", "arch64zbc", "arch64zbs", "imperas64f", "imperas64d", "imperas64c", "imperas64i"] diff --git a/tests/coverage/lsu.S b/tests/coverage/lsu.S new file mode 100644 index 00000000..63fbda8d --- /dev/null +++ b/tests/coverage/lsu.S @@ -0,0 +1,33 @@ +/////////////////////////////////////////// +// lsu.S +// +// Written: Kevin Box and Miles Cook kbox@hmc.edu mdcook@hmc.edu 26 March 2023 +// +// Purpose: Test coverage for lsu +// +// A component of the CORE-V-WALLY configurable RISC-V project. +// +// Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University +// +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// +// Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file +// except in compliance with the License, or, at your option, the Apache License version 2.0. You +// may obtain a copy of the License at +// +// https://solderpad.org/licenses/SHL-2.1/ +// +// Unless required by applicable law or agreed to in writing, any work distributed under the +// License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +// either express or implied. See the License for the specific language governing permissions +// and limitations under the License. +//////////////////////////////////////////////////////////////////////////////////////////////// + +// load code to initalize stack, handle interrupts, terminate +#include "WALLY-init-lib.h" + +main: + + sfence.vma x0, x0 // sfence.vma to assert TLBFlush + + j done From 2c1a0c19dc0d8810639dfd4060675e2a256a3a53 Mon Sep 17 00:00:00 2001 From: Kevin Box Date: Wed, 5 Apr 2023 10:27:11 -0700 Subject: [PATCH 2/5] remove testing change --- sim/regression-wally | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sim/regression-wally b/sim/regression-wally index 07613aea..ddbd88bb 100755 --- a/sim/regression-wally +++ b/sim/regression-wally @@ -135,9 +135,9 @@ tests64gc = ["arch64f", "arch64d", "arch64i", "arch64zba", "arch64zbb", "arch64z "arch64priv", "arch64c", "arch64m", "arch64zi", "wally64a", "wally64periph", "wally64priv"] if (coverage): # delete all but 64gc tests when running coverage configs = [] -# tests64gc = ["coverage64gc", "arch64f", "arch64d", "arch64i", "arch64priv", "arch64c", "arch64m", - tests64gc = ["coverage64gc", "arch64f", "arch64d", "arch64i", "arch64priv", "arch64c", "arch64m", -# tests64gc = ["coverage64gc", "arch64i", "arch64priv", "arch64c", "arch64m", +# tests64gc = ["coverage64gc", "arch64f", "arch64d", "arch64i", "arch64priv", "arch64c", "arch64m", + + tests64gc = ["coverage64gc", "arch64i", "arch64priv", "arch64c", "arch64m", "arch64zi", "wally64a", "wally64periph", "wally64priv", "arch64zba", "arch64zbb", "arch64zbc", "arch64zbs", "imperas64f", "imperas64d", "imperas64c", "imperas64i"] From 0517c6b2beca09adfef587f8869dc50037b765ca Mon Sep 17 00:00:00 2001 From: Kevin Box Date: Wed, 5 Apr 2023 10:27:34 -0700 Subject: [PATCH 3/5] remove testing changes --- sim/regression-wally | 1 - 1 file changed, 1 deletion(-) diff --git a/sim/regression-wally b/sim/regression-wally index ddbd88bb..1d1b9ad6 100755 --- a/sim/regression-wally +++ b/sim/regression-wally @@ -136,7 +136,6 @@ tests64gc = ["arch64f", "arch64d", "arch64i", "arch64zba", "arch64zbb", "arch64z if (coverage): # delete all but 64gc tests when running coverage configs = [] # tests64gc = ["coverage64gc", "arch64f", "arch64d", "arch64i", "arch64priv", "arch64c", "arch64m", - tests64gc = ["coverage64gc", "arch64i", "arch64priv", "arch64c", "arch64m", "arch64zi", "wally64a", "wally64periph", "wally64priv", "arch64zba", "arch64zbb", "arch64zbc", "arch64zbs", From 490cebe36bb96ddcf6d312517fe83ba77b439069 Mon Sep 17 00:00:00 2001 From: Kevin Box Date: Wed, 5 Apr 2023 10:32:25 -0700 Subject: [PATCH 4/5] Revert "Add sfence.vma and arch64d/f tests to increase coverage in the LSU" This reverts commit 90b5d279fd8521afe1c0d1094490c21cbb8154c3. --- sim/regression-wally | 2 +- tests/coverage/lsu.S | 33 --------------------------------- 2 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 tests/coverage/lsu.S diff --git a/sim/regression-wally b/sim/regression-wally index 1d1b9ad6..c7017720 100755 --- a/sim/regression-wally +++ b/sim/regression-wally @@ -135,7 +135,7 @@ tests64gc = ["arch64f", "arch64d", "arch64i", "arch64zba", "arch64zbb", "arch64z "arch64priv", "arch64c", "arch64m", "arch64zi", "wally64a", "wally64periph", "wally64priv"] if (coverage): # delete all but 64gc tests when running coverage configs = [] -# tests64gc = ["coverage64gc", "arch64f", "arch64d", "arch64i", "arch64priv", "arch64c", "arch64m", +# tests64gc = ["coverage64gc", "arch64f", "arch64d", "arch64i", "arch64priv", "arch64c", "arch64m", tests64gc = ["coverage64gc", "arch64i", "arch64priv", "arch64c", "arch64m", "arch64zi", "wally64a", "wally64periph", "wally64priv", "arch64zba", "arch64zbb", "arch64zbc", "arch64zbs", diff --git a/tests/coverage/lsu.S b/tests/coverage/lsu.S deleted file mode 100644 index 63fbda8d..00000000 --- a/tests/coverage/lsu.S +++ /dev/null @@ -1,33 +0,0 @@ -/////////////////////////////////////////// -// lsu.S -// -// Written: Kevin Box and Miles Cook kbox@hmc.edu mdcook@hmc.edu 26 March 2023 -// -// Purpose: Test coverage for lsu -// -// A component of the CORE-V-WALLY configurable RISC-V project. -// -// Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University -// -// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 -// -// Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file -// except in compliance with the License, or, at your option, the Apache License version 2.0. You -// may obtain a copy of the License at -// -// https://solderpad.org/licenses/SHL-2.1/ -// -// Unless required by applicable law or agreed to in writing, any work distributed under the -// License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -// either express or implied. See the License for the specific language governing permissions -// and limitations under the License. -//////////////////////////////////////////////////////////////////////////////////////////////// - -// load code to initalize stack, handle interrupts, terminate -#include "WALLY-init-lib.h" - -main: - - sfence.vma x0, x0 // sfence.vma to assert TLBFlush - - j done From c43ee180d3d128b968c4c251e0758fcb7390355b Mon Sep 17 00:00:00 2001 From: Kevin Box Date: Wed, 5 Apr 2023 09:45:09 -0700 Subject: [PATCH 5/5] Add sfence.vma --- tests/coverage/lsu.S | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/coverage/lsu.S diff --git a/tests/coverage/lsu.S b/tests/coverage/lsu.S new file mode 100644 index 00000000..63fbda8d --- /dev/null +++ b/tests/coverage/lsu.S @@ -0,0 +1,33 @@ +/////////////////////////////////////////// +// lsu.S +// +// Written: Kevin Box and Miles Cook kbox@hmc.edu mdcook@hmc.edu 26 March 2023 +// +// Purpose: Test coverage for lsu +// +// A component of the CORE-V-WALLY configurable RISC-V project. +// +// Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University +// +// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 +// +// Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file +// except in compliance with the License, or, at your option, the Apache License version 2.0. You +// may obtain a copy of the License at +// +// https://solderpad.org/licenses/SHL-2.1/ +// +// Unless required by applicable law or agreed to in writing, any work distributed under the +// License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +// either express or implied. See the License for the specific language governing permissions +// and limitations under the License. +//////////////////////////////////////////////////////////////////////////////////////////////// + +// load code to initalize stack, handle interrupts, terminate +#include "WALLY-init-lib.h" + +main: + + sfence.vma x0, x0 // sfence.vma to assert TLBFlush + + j done