forked from Github_Repos/cvw
Coverage improvements in ieu, hazard units
This commit is contained in:
parent
820e3513c7
commit
b95730e3a1
@ -24,8 +24,12 @@
|
|||||||
#// and limitations under the License.
|
#// and limitations under the License.
|
||||||
#////////////////////////////////////////////////////////////////////////////////////////////////
|
#////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
# This file should be a last resort. It's preferable to put
|
||||||
|
# // coverage off
|
||||||
|
# statements inline with the code whenever possible.
|
||||||
|
|
||||||
# LZA (i<64) statement confuses coverage tool
|
# LZA (i<64) statement confuses coverage tool
|
||||||
# This is ugly to exlcude the whole file - is there a better option
|
# This is ugly to exlcude the whole file - is there a better option? // coverage off isn't working
|
||||||
coverage exclude -srcfile lzc.sv
|
coverage exclude -srcfile lzc.sv
|
||||||
|
|
||||||
|
|
||||||
|
@ -88,7 +88,9 @@ module hazard (
|
|||||||
assign StallWCause = (IFUStallF & ~FlushDCause) | (LSUStallM & ~FlushWCause);
|
assign StallWCause = (IFUStallF & ~FlushDCause) | (LSUStallM & ~FlushWCause);
|
||||||
|
|
||||||
// Stall each stage for cause or if the next stage is stalled
|
// Stall each stage for cause or if the next stage is stalled
|
||||||
|
// coverage off: StallFCause is always 0
|
||||||
assign #1 StallF = StallFCause | StallD;
|
assign #1 StallF = StallFCause | StallD;
|
||||||
|
// coverage on
|
||||||
assign #1 StallD = StallDCause | StallE;
|
assign #1 StallD = StallDCause | StallE;
|
||||||
assign #1 StallE = StallECause | StallM;
|
assign #1 StallE = StallECause | StallM;
|
||||||
assign #1 StallM = StallMCause | StallW;
|
assign #1 StallM = StallMCause | StallW;
|
||||||
|
@ -101,8 +101,10 @@ module bmuctrl(
|
|||||||
BMUControlsD = `BMUCTRLW'b000_10_001_1_1_0_1_0_0_0_0_0; // sign extend instruction
|
BMUControlsD = `BMUCTRLW'b000_10_001_1_1_0_1_0_0_0_0_0; // sign extend instruction
|
||||||
else if ((Rs2D[4:2]==3'b000) & ~(Rs2D[1] & Rs2D[0]))
|
else if ((Rs2D[4:2]==3'b000) & ~(Rs2D[1] & Rs2D[0]))
|
||||||
BMUControlsD = `BMUCTRLW'b000_10_000_1_1_0_1_0_0_0_0_0; // count instruction
|
BMUControlsD = `BMUCTRLW'b000_10_000_1_1_0_1_0_0_0_0_0; // count instruction
|
||||||
17'b0110011_0000100_100: if (`XLEN == 32)
|
// // coverage off: This case can't occur in RV64
|
||||||
BMUControlsD = `BMUCTRLW'b000_10_001_1_1_0_1_0_0_0_0_0; // zexth (rv32)
|
// 17'b0110011_0000100_100: if (`XLEN == 32)
|
||||||
|
// BMUControlsD = `BMUCTRLW'b000_10_001_1_1_0_1_0_0_0_0_0; // zexth (rv32)
|
||||||
|
// // coverage on
|
||||||
17'b0110011_0100000_111: BMUControlsD = `BMUCTRLW'b111_01_111_1_0_0_1_1_0_0_0_0; // andn
|
17'b0110011_0100000_111: BMUControlsD = `BMUCTRLW'b111_01_111_1_0_0_1_1_0_0_0_0; // andn
|
||||||
17'b0110011_0100000_110: BMUControlsD = `BMUCTRLW'b110_01_111_1_0_0_1_1_0_0_0_0; // orn
|
17'b0110011_0100000_110: BMUControlsD = `BMUCTRLW'b110_01_111_1_0_0_1_1_0_0_0_0; // orn
|
||||||
17'b0110011_0100000_100: BMUControlsD = `BMUCTRLW'b100_01_111_1_0_0_1_1_0_0_0_0; // xnor
|
17'b0110011_0100000_100: BMUControlsD = `BMUCTRLW'b100_01_111_1_0_0_1_1_0_0_0_0; // xnor
|
||||||
|
@ -264,7 +264,9 @@ module controller(
|
|||||||
end else assign sltD = (Funct3D == 3'b010);
|
end else assign sltD = (Funct3D == 3'b010);
|
||||||
|
|
||||||
// Combine base and bit manipulation signals
|
// Combine base and bit manipulation signals
|
||||||
|
// coverage off: IllegalERegAdr can't occur in rv64gc; only applicable to E mode
|
||||||
assign IllegalBaseInstrD = (ControlsD[0] & IllegalBitmanipInstrD) | IllegalERegAdrD ;
|
assign IllegalBaseInstrD = (ControlsD[0] & IllegalBitmanipInstrD) | IllegalERegAdrD ;
|
||||||
|
// coverage on
|
||||||
assign RegWriteD = BaseRegWriteD | BRegWriteD;
|
assign RegWriteD = BaseRegWriteD | BRegWriteD;
|
||||||
assign W64D = BaseW64D | BW64D;
|
assign W64D = BaseW64D | BW64D;
|
||||||
assign ALUSrcBD = BaseALUSrcBD | BALUSrcBD;
|
assign ALUSrcBD = BaseALUSrcBD | BALUSrcBD;
|
||||||
|
@ -149,7 +149,7 @@ module lsu (
|
|||||||
// MMU include PMP and is needed if any privileged supported
|
// MMU include PMP and is needed if any privileged supported
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
if(`VIRTMEM_SUPPORTED) begin : VIRTMEM_SUPPORTED
|
if(`VIRTMEM_SUPPORTED) begin : hptw
|
||||||
hptw hptw(.clk, .reset, .MemRWM, .AtomicM, .ITLBMissF, .ITLBWriteF,
|
hptw hptw(.clk, .reset, .MemRWM, .AtomicM, .ITLBMissF, .ITLBWriteF,
|
||||||
.DTLBMissM, .DTLBWriteM, .InstrUpdateDAF, .DataUpdateDAM,
|
.DTLBMissM, .DTLBWriteM, .InstrUpdateDAF, .DataUpdateDAM,
|
||||||
.FlushW, .DCacheStallM, .SATP_REGW, .PCSpillF,
|
.FlushW, .DCacheStallM, .SATP_REGW, .PCSpillF,
|
||||||
|
Loading…
Reference in New Issue
Block a user