From 19ec4561ac716f727c9e0482be98deec897d5d8e Mon Sep 17 00:00:00 2001 From: Clo91eaf Date: Sun, 13 Oct 2024 21:29:08 +0800 Subject: [PATCH] [ipemu] filter 64-bit width instructions in t1 emu coverage flow --- t1emu/src/TestBench.scala | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/t1emu/src/TestBench.scala b/t1emu/src/TestBench.scala index 1896f6f8c..d30e6f5e0 100644 --- a/t1emu/src/TestBench.scala +++ b/t1emu/src/TestBench.scala @@ -285,7 +285,30 @@ class TestBench(generator: SerializableModuleGenerator[T1, T1Parameter]) scoreboard.bits := 0.U } } - generator.parameter.decoderParam.allInstructions.map { instruction: Instruction => + // coverage + // unsupported 64-bit instructions for 32-bit xlen + val unsupportedInstF = Seq( + // format: off + "vfwadd.vf", "vfwadd.vv", "vfwadd.wf", "vfwadd.wv", + "vfwcvt.f.f.v", "vfwcvt.f.x.v", "vfwcvt.f.xu.v", "vfwcvt.rtz.x.f.v", "vfwcvt.rtz.xu.f.v", "vfwcvt.x.f.v", "vfwcvt.xu.f.v", + "vfwmacc.vf", "vfwmacc.vv", "vfwmsac.vf", "vfwmsac.vv", + "vfwmul.vf", "vfwmul.vv", "vfwnmacc.vf", "vfwnmacc.vv", + "vfwnmsac.vf", "vfwnmsac.vv", "vfwredosum.vs", "vfwredusum.vs", + "vfwsub.vf", "vfwsub.vv", "vfwsub.wf", "vfwsub.wv", + // format: on + ) + val unsupportedInst = Seq( + // format: off + "vfncvt.f.f.w", "vfncvt.f.x.w", "vfncvt.f.xu.w", "vfncvt.rod.f.f.w", "vfncvt.rtz.x.f.w", "vfncvt.rtz.xu.f.w", "vfncvt.x.f.w", "vfncvt.xu.f.w", + "vfslide1up.vf", "vfslide1down.vf", + "vl1re64.v", "vl2re64.v", "vl4re64.v", "vl8re64.v", + "vle64.v", "vle64ff.v", "vloxei64.v", "vlse64.v", "vluxei64.v", + "vmfle.vf", "vmfle.vv", "vse64.v", "vsext.vf8", "vsoxei64.v", "vsse64.v", "vsuxei64.v", "vzext.vf8" + // format: on + ) ++ unsupportedInstF + generator.parameter.decoderParam.allInstructions.filter { instruction: Instruction => + !(unsupportedInst.contains(instruction.name) && generator.parameter.xlen == 32) + }.map { instruction: Instruction => val issueMatch = Sequence.BoolSequence(issue.instruction === BitPat("b" + instruction.encoding.toString)) CoverProperty(issueMatch, label = Some(s"t1_cover_issue_${instruction.name}")) }