Hi All,
I am bit confused about the following dout result:
sc_out<sc_int<8> > dout; sc_int<8> din1=0x80; sc_uint<4> din2=0x9; dout.write(din1 % din2);
dout=5;
I know that I am mixing sizes and signed/unsigned but I am intrigued what causes the result to be 5.
I was expecting either -128%9=-2 (or -128%-7=-2). If din1 is reduce to 4 bits then I would expected -1%9=-1 or 0.
Thanks.