Skip to content

Commit

Permalink
test: add enable to RegNext
Browse files Browse the repository at this point in the history
  • Loading branch information
sinceforYy committed Mar 4, 2024
1 parent 623e2a6 commit 79b2afd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/test/scala/top/VectorSimTop.scala
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class SimTop() extends VPUTestModule {
val vcvt = Module(new VectorCvt(XLEN))

require(vfa.io.fp_a.getWidth == XLEN)
vfa.io.fire := io.in.valid
vfa.io.fp_a := src1
vfa.io.fp_b := src2
//io.widen_a Cat(vs2(95,64),vs2(31,0)) or Cat(vs2(127,96),vs2(63,32))
Expand Down Expand Up @@ -229,6 +230,7 @@ class SimTop() extends VPUTestModule {
via_result.fflags(i) := 0.U // DontCare
via_result.vxsat := 0.U // DontCare

vff.io.fire := io.in.valid
vff.io.fp_a := src1
vff.io.fp_b := src2
vff.io.fp_c := src3
Expand All @@ -252,6 +254,7 @@ class SimTop() extends VPUTestModule {
vff_result.vxsat := 0.U // DontCare

// connect vcvt's io
vcvt.io.fire := io.in.valid
vcvt.io.sew := sew
vcvt.io.opType := opcode
vcvt.io.rm := rm
Expand Down
3 changes: 2 additions & 1 deletion src/test/scala/vector/VFCvtWapper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import yunsuan.vector.VectorConvert.{VectorCvt, VectorCvtIO}

class VFCVTTop(xlen :Int) extends Module{
val io = IO(new VectorCvtIO(xlen))
val (src, opType, sew, rm) = (io.src, io.opType, io.sew, io.rm)
val (fire, src, opType, sew, rm) = (io.fire, io.src, io.opType, io.sew, io.rm)
val vfcvtWrapper = Module(new VectorCvt(64))

val inputNext = Wire(UInt(64.W))
val inputReg = RegNext(inputNext,0.U)
inputNext := src

vfcvtWrapper.io.fire := fire
vfcvtWrapper.io.src := inputReg
vfcvtWrapper.io.opType := opType
vfcvtWrapper.io.sew := sew
Expand Down
1 change: 1 addition & 0 deletions src/test/scala/vector/VectorALU/VIMac64bSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class VIMac64bWrapper extends Module {
})

val vIMac = Module(new VIMac64b)
vIMac.io.fire := io.in.valid
vIMac.io.info := io.in.bits.info
vIMac.io.srcType := io.in.bits.srcType
vIMac.io.vdType := io.in.bits.vdType
Expand Down

0 comments on commit 79b2afd

Please sign in to comment.