From 5d8c060e4ff0b1104834e73c03e75f70416f0eb9 Mon Sep 17 00:00:00 2001 From: David Harris Date: Wed, 5 Jun 2024 13:41:20 -0700 Subject: [PATCH 1/3] Fixed testcount to not make spurious warnings about src --- bin/testcount.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/testcount.pl b/bin/testcount.pl index 139902dd3..86e56da4c 100755 --- a/bin/testcount.pl +++ b/bin/testcount.pl @@ -30,10 +30,14 @@ ## and limitations under the License. ################################################################################################ -for dir in `ls ${WALLY}/addins/riscv-arch-test/riscv-test-suite/rv*/*` +for dir1 in `ls ${WALLY}/addins/riscv-arch-test/riscv-test-suite/rv*/*` do - dir=$(echo $dir | cut -d':' -f1) + dir=$(echo $dir1 | cut -d':' -f1) echo $dir + if [ $dir == "src" ] + then + continue + fi for fn in `ls $dir/src/*.S` do result=`grep 'inst_' $fn | tail -n 1` From 1af670d5be7501bc799a49dca5f430f2ad6b5946 Mon Sep 17 00:00:00 2001 From: David Harris Date: Wed, 5 Jun 2024 13:42:29 -0700 Subject: [PATCH 2/3] Fixed testcount to not make spurious warnings about src --- bin/testcount.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/testcount.pl b/bin/testcount.pl index 86e56da4c..7ac75d676 100755 --- a/bin/testcount.pl +++ b/bin/testcount.pl @@ -30,9 +30,9 @@ ## and limitations under the License. ################################################################################################ -for dir1 in `ls ${WALLY}/addins/riscv-arch-test/riscv-test-suite/rv*/*` +for dir in `ls ${WALLY}/addins/riscv-arch-test/riscv-test-suite/rv*/*` do - dir=$(echo $dir1 | cut -d':' -f1) + dir=$(echo $dir | cut -d':' -f1) echo $dir if [ $dir == "src" ] then From 9489771bd73dc2d77d7119881c92279be30e5c06 Mon Sep 17 00:00:00 2001 From: David Harris Date: Wed, 5 Jun 2024 22:57:39 -0700 Subject: [PATCH 3/3] Fixed support for individual crypto extensions without Zb* --- src/ieu/alu.sv | 4 +++- src/ieu/bmu/bitmanipalu.sv | 7 ++++++- src/ieu/bmu/bmuctrl.sv | 13 +++++-------- src/ieu/controller.sv | 8 ++++++-- src/ieu/shifter.sv | 4 ++-- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/ieu/alu.sv b/src/ieu/alu.sv index e1cae73a6..74eb6f7f6 100644 --- a/src/ieu/alu.sv +++ b/src/ieu/alu.sv @@ -109,7 +109,9 @@ module alu import cvw::*; #(parameter cvw_t P) ( else assign PreALUResult = FullResult; // Bit manipulation muxing - if (P.ZBC_SUPPORTED | P.ZBS_SUPPORTED | P.ZBA_SUPPORTED | P.ZBB_SUPPORTED | P.ZBKB_SUPPORTED | P.ZBKC_SUPPORTED | P.ZBKX_SUPPORTED | P.ZKND_SUPPORTED | P.ZKNE_SUPPORTED | P.ZKNH_SUPPORTED) begin : bitmanipalu + if (P.ZBC_SUPPORTED | P.ZBS_SUPPORTED | P.ZBA_SUPPORTED | P.ZBB_SUPPORTED | + P.ZBKB_SUPPORTED | P.ZBKC_SUPPORTED | P.ZBKX_SUPPORTED | + P.ZKND_SUPPORTED | P.ZKNE_SUPPORTED | P.ZKNH_SUPPORTED) begin : bitmanipalu bitmanipalu #(P) balu( .A, .B, .W64, .BSelect, .ZBBSelect, .BMUActive, .Funct3, .Funct7, .Rs2E, .LT,.LTU, .BALUControl, .PreALUResult, .FullResult, diff --git a/src/ieu/bmu/bitmanipalu.sv b/src/ieu/bmu/bitmanipalu.sv index 36feff63e..cd6bc1993 100644 --- a/src/ieu/bmu/bitmanipalu.sv +++ b/src/ieu/bmu/bitmanipalu.sv @@ -87,7 +87,7 @@ module bitmanipalu import cvw::*; #(parameter cvw_t P) ( end // Bit reverse needed for some ZBB, ZBC instructions - if (P.ZBC_SUPPORTED | P.ZBB_SUPPORTED) begin: bitreverse + if (P.ZBC_SUPPORTED | P.ZBKC_SUPPORTED | P.ZBB_SUPPORTED) begin: bitreverse bitreverse #(P.XLEN) brA(.A(ABMU), .RevA); end @@ -99,6 +99,11 @@ module bitmanipalu import cvw::*; #(parameter cvw_t P) ( // ZBB Unit if (P.ZBB_SUPPORTED) begin: zbb zbb #(P.XLEN) ZBB(.A(ABMU), .RevA, .B(BBMU), .W64, .LT, .LTU, .BUnsigned(Funct3[0]), .ZBBSelect(ZBBSelect[2:0]), .ZBBResult); + end else if (P.ZBKB_SUPPORTED) begin: zbkbonly // only needs rev8 portion + genvar i; + for (i=0;i