Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes several unused tests/custom and updates coverage exclusions #987

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion sim/questa/coverage-exclusions-rv64gc.do
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ set line [GetLineNum ${SRC}/mmu/pmachecker.sv "ReadAccessM \\| ExecuteAccessF"]
coverage exclude -scope /dut/core/ifu/immu/immu/pmachecker -linerange $line-$line -item e 1 -fecexprrow 1-3
set line [GetLineNum ${SRC}/mmu/pmachecker.sv "ExecuteAccessF & PMAAccessFault"]
coverage exclude -scope /dut/core/ifu/immu/immu/pmachecker -linerange $line-$line -item e 1 -fecexprrow 1
set line [GetLineNum ${SRC}/mmu/pmachecker.sv "ReadAccessM & PMAAccessFault"]
set line [GetLineNum ${SRC}/mmu/pmachecker.sv "ReadAccessM & ~WriteAccessM & PMAAccessFault"]
coverage exclude -scope /dut/core/ifu/immu/immu/pmachecker -linerange $line-$line -item e 1 -fecexprrow 2-4
set line [GetLineNum ${SRC}/mmu/pmachecker.sv "PMAStoreAmoAccessFaultM ="]
coverage exclude -scope /dut/core/ifu/immu/immu/pmachecker -linerange $line-$line
Expand Down
12 changes: 6 additions & 6 deletions src/lsu/lsu.sv
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@ module lsu import cvw::*; #(parameter cvw_t P) (

// The DTIM uses untranslated addresses, so it is not compatible with virtual memory.
mux2 #(P.PA_BITS) DTIMAdrMux(IEUAdrExtE[P.PA_BITS-1:0], IEUAdrExtM[P.PA_BITS-1:0], MemRWM[0], DTIMAdr);
assign DTIMMemRWM = SelDTIM & ~IgnoreRequestTLB ? LSURWM : 0;
assign DTIMMemRWM = SelDTIM ? LSURWM : 0;
dtim #(P) dtim(.clk, .reset, .ce(~GatedStallW),
.MemRWM(DTIMMemRWM),
.DTIMAdr, .FlushW, .WriteDataM(LSUWriteDataM),
.DTIMAdr, .FlushW(IgnoreRequest), .WriteDataM(LSUWriteDataM),
.ReadDataWordM(DTIMReadDataWordM[P.LLEN-1:0]), .ByteMaskM(ByteMaskM));
end else
assign DTIMReadDataWordM = '0;
Expand Down Expand Up @@ -331,7 +331,7 @@ module lsu import cvw::*; #(parameter cvw_t P) (

cache #(.P(P), .PA_BITS(P.PA_BITS), .XLEN(P.XLEN), .LINELEN(P.DCACHE_LINELENINBITS), .NUMSETS(P.DCACHE_WAYSIZEINBYTES*8/LINELEN),
.NUMWAYS(P.DCACHE_NUMWAYS), .LOGBWPL(LLENLOGBWPL), .WORDLEN(CACHEWORDLEN), .MUXINTERVAL(P.LLEN), .READ_ONLY_CACHE(0)) dcache(
.clk, .reset, .Stall(GatedStallW & ~SelSpillE), .SelBusBeat, .FlushStage(FlushW | IgnoreRequestTLB),
.clk, .reset, .Stall(GatedStallW & ~SelSpillE), .SelBusBeat, .FlushStage(IgnoreRequest),
.CacheRW(CacheRWM),
.FlushCache(FlushDCache), .NextSet(IEUAdrExtE[11:0]), .PAdr(PAdrM),
.ByteMask(ByteMaskSpillM), .BeatCount(BeatCount[AHBWLOGBWPL-1:AHBWLOGBWPL-LLENLOGBWPL]),
Expand All @@ -346,7 +346,7 @@ module lsu import cvw::*; #(parameter cvw_t P) (
assign CacheBusRW = CacheBusRWTemp;

ahbcacheinterface #(.P(P), .BEATSPERLINE(BEATSPERLINE), .AHBWLOGBWPL(AHBWLOGBWPL), .LINELEN(LINELEN), .LLENPOVERAHBW(LLENPOVERAHBW), .READ_ONLY_CACHE(0)) ahbcacheinterface(
.HCLK(clk), .HRESETn(~reset), .Flush(FlushW | IgnoreRequestTLB),
.HCLK(clk), .HRESETn(~reset), .Flush(IgnoreRequest),
.HRDATA, .HWDATA(LSUHWDATA), .HWSTRB(LSUHWSTRB),
.HSIZE(LSUHSIZE), .HBURST(LSUHBURST), .HTRANS(LSUHTRANS), .HWRITE(LSUHWRITE), .HREADY(LSUHREADY),
.BeatCount, .SelBusBeat, .CacheReadDataWordM(DCacheReadDataWordM[P.LLEN-1:0]), .WriteDataM(LSUWriteDataM),
Expand All @@ -361,12 +361,12 @@ module lsu import cvw::*; #(parameter cvw_t P) (
end else begin : passthrough // No Cache, use simple ahbinterface instad of ahbcacheinterface
logic [1:0] BusRW; // Non-DTIM memory access, ignore cacheableM
logic [P.XLEN-1:0] FetchBuffer;
assign BusRW = (~IgnoreRequestTLB & ~SelDTIM) ? LSURWM : 0;
assign BusRW = ~SelDTIM ? LSURWM : 0;

assign LSUHADDR = PAdrM;
assign LSUHSIZE = LSUFunct3M;

ahbinterface #(P.XLEN, 1'b1) ahbinterface(.HCLK(clk), .HRESETn(~reset), .Flush(FlushW), .HREADY(LSUHREADY),
ahbinterface #(P.XLEN, 1'b1) ahbinterface(.HCLK(clk), .HRESETn(~reset), .Flush(IgnoreRequest), .HREADY(LSUHREADY),
.HRDATA(HRDATA), .HTRANS(LSUHTRANS), .HWRITE(LSUHWRITE), .HWDATA(LSUHWDATA),
.HWSTRB(LSUHWSTRB), .BusRW, .BusAtomic(AtomicM[1]), .ByteMask(ByteMaskM[P.XLEN/8-1:0]), .WriteData(LSUWriteDataM[P.XLEN-1:0]),
.Stall(GatedStallW), .BusStall, .BusCommitted(BusCommittedM), .FetchBuffer(FetchBuffer));
Expand Down
2 changes: 1 addition & 1 deletion testbench/testbench.sv
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ module testbench;
$fclose(outputFilePointer);
$display("Embench Benchmark: created output file: %s", outputfile);
end else if (TEST == "coverage64gc") begin
$display("Coverage tests don't get checked");
$display("%s ran. Coverage tests don't get checked", tests[test]);
end else if (ElfFile != "none") begin
$display("Single Elf file tests are not signatured verified.");
`ifdef QUESTA
Expand Down
8 changes: 5 additions & 3 deletions testbench/tests.vh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ string coverage64gc[] = '{
"tlbMP",
"tlbGP",
"tlbTP",
"tlbMisaligned",
"hptwAccessFault",
"amoAccessFault",
"floatmisc",
"ifuCamlineWrite",
"dcache1",
"dcache2",
Expand Down Expand Up @@ -3410,9 +3414,7 @@ string fpga[] = '{

string custom[] = '{
`CUSTOM,
"simple",
"debug",
"cacheTest"
"NULL"
};

string ahb64[] = '{
Expand Down
File renamed without changes.
51 changes: 51 additions & 0 deletions tests/custom/simple/global_hist_test.s → tests/coverage/gshare.S
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
///////////////////////////////////////////
// gshare.S
//
// Written: Rose Thompson [email protected]
//
// Purpose: basic check that global history and gshare branch npredictors are working as expected. Requires manual inspection.
// TODO: *** Automate checking prediction accuracy.
//
// A component of the CORE-V-WALLY configurable RISC-V project.
// https://github.com/openhwgroup/cvw
//
// Copyright (C) 2021-24 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"

# run-elf.bash find this in project description
main:

addi sp, sp, 8
sd ra, 0(sp)
jal ra, oneLoopTest
jal ra, global_hist_6_space_test
jal ra, global_hist_4_space_test
jal ra, global_hist_3_space_test
jal ra, global_hist_2_space_test
jal ra, global_hist_1_space_test
jal ra, global_hist_0_space_test

fence.I

finished:
j done

.data

.section .text
.globl oneLoopTest
.type oneLoopTest, @function
Expand Down
90 changes: 0 additions & 90 deletions tests/custom/cacheSimTest/CacheSimTest.py

This file was deleted.

31 changes: 0 additions & 31 deletions tests/custom/debug/Makefile

This file was deleted.

19 changes: 0 additions & 19 deletions tests/custom/james_mm/Makefile

This file was deleted.

Loading