Expecting a SInt value from a Wire, in Chisel

29 views Asked by At

I am designing a simple array multiplier in chisel. I am facing a problem, while testing it using poke/expect method.

For eg: After multiplying -2 and 1, I am getting my output as 254, which is 2's complement form of -2. Is there a way I can have this value (-2) exactly. My final output is assigned as : io.output := output_temp.asSInt and in testbench : dut.io.output.expect(-2.S)

P.S: output_temp is a SInt wire.

0

There are 0 answers