diff --git a/src/test/scala/vfrope/ieee754test.scala b/src/test/scala/vfrope/ieee754test.scala index 168da85..f9b2c4e 100644 --- a/src/test/scala/vfrope/ieee754test.scala +++ b/src/test/scala/vfrope/ieee754test.scala @@ -49,23 +49,23 @@ class FP32AdderTest extends AnyFlatSpec with ChiselScalatestTester { dut.io.a.poke(0x3fc00000.U) // 1.5 dut.io.b.poke(0x40100000.U) // 2.25 dut.clock.step() - println(s"expected 40700000 : 0x${dut.io.result.peek().litValue.toString(16)}\n\n") + println(s"1.5 + 2.25 = expected 40700000 : 0x${dut.io.result.peek().litValue.toString(16)}\n\n") // 얘 통과 // For negative numbers, use BigInt to handle UInt interpretation correctly dut.io.a.poke(BigInt("bfc00000", 16).U) // -1.5 dut.io.b.poke(0x40100000.U) // 2.25 dut.clock.step() - println(s"expected 3f400000 : 0x${dut.io.result.peek().litValue.toString(16)}") + println(s"-1.5 + 2.25 = expected 3f400000 : 0x${dut.io.result.peek().litValue.toString(16)}") // 얘 안됨 - // dut.io.a.poke(0x3fc00000.U) // 1.5 - // dut.io.b.poke(BigInt("c0100000", 16).U) // -2.25 - // dut.clock.step() - // println(s"expected bf400000 : 0x${dut.io.result.peek().litValue.toString(16)}") + dut.io.a.poke(0x3fc00000.U) // 1.5 + dut.io.b.poke(BigInt("c0100000", 16).U) // -2.25 + dut.clock.step() + println(s"1.5 - 2.25 = expected bf400000 : 0x${dut.io.result.peek().litValue.toString(16)}") // 얘 안됨 - // dut.io.a.poke(BigInt("bfc00000", 16).U) // -1.5 - // dut.io.b.poke(BigInt("c0100000", 16).U) // -2.25 - // dut.clock.step() - // println(s"expected c0700000 : 0x${dut.io.result.peek().litValue.toString(16)}") + dut.io.a.poke(BigInt("bfc00000", 16).U) // -1.5 + dut.io.b.poke(BigInt("c0100000", 16).U) // -2.25 + dut.clock.step() + println(s"-1.5 - 2.25 = expected c0700000 : 0x${dut.io.result.peek().litValue.toString(16)}") //얘도 OK } } }