Skip to content

Commit

Permalink
address coments
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoling-yi committed Jan 22, 2024
1 parent a3f94a7 commit 454ff15
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/test/scala/simd/PETest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class PEManualTest
double_round: Bool,
golden_output: Byte
) = {
dut.clock.step()
dut.clock.step(1)

// giving input data
dut.io.input_i.poke(input)
Expand All @@ -117,15 +117,15 @@ class PEManualTest
dut.io.ctrl_i.max_int_i.poke(max_int)
dut.io.ctrl_i.min_int_i.poke(min_int)
dut.io.ctrl_i.double_round_i.poke(double_round)
dut.clock.step()
dut.clock.step(1)

// grab the output data
val out = dut.io.out_o.peekInt()

// assert the PE's output data equals to the golden data
assert(out == golden_output)

dut.clock.step()
dut.clock.step(1)
}

// manually random data test
Expand Down
12 changes: 6 additions & 6 deletions src/test/scala/simd/SIMDTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ trait HasSIMDTestUtils
// give input data big bus to dut
def giveInputData[T <: SIMD](dut: T, input: BigInt) = {
// giving input data
dut.clock.step()
dut.clock.step(1)
dut.io.data.input_i.bits.poke(input)
dut.io.data.input_i.valid.poke(1.B)
while (dut.io.data.input_i.ready.peekBoolean() == false) {
dut.clock.step(1)
}
dut.clock.step()
dut.clock.step(1)

}

Expand Down Expand Up @@ -150,7 +150,7 @@ trait HasSIMDTestUtils
doubleRound: Bool,
goldenValue: Array[Byte]
) = {
dut.clock.step()
dut.clock.step(1)

// giving the configuration
dut.io.ctrl.bits.input_zp_i.poke(input_zp)
Expand All @@ -164,7 +164,7 @@ trait HasSIMDTestUtils
while (dut.io.ctrl.ready.peekBoolean() == false) {
dut.clock.step(1)
}
dut.clock.step()
dut.clock.step(1)

dut.io.ctrl.valid.poke(0)

Expand All @@ -174,7 +174,7 @@ trait HasSIMDTestUtils
// get output and check
checkSIMDOutput(dut, goldenValue)

dut.clock.step()
dut.clock.step(1)
}

}
Expand All @@ -190,7 +190,7 @@ class SIMDAutoTest
Seq(WriteVcdAnnotation)
) { dut =>
// set test number
val testNum = 1
val testNum = 100

// random test data generation
for (i <- 1 to testNum) {
Expand Down

0 comments on commit 454ff15

Please sign in to comment.