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.