I found that sc_fixed's rounding behaviour is not consistent with my understanding. For example:
sc_fixed<10,10,SC_TRN,SC_WRAP> a;
sc_int<10> b;
I expect a and b should behave the same but if the values are -ve, their behaviours are not the same.
a = -75; b = -75;
a = -(a>>6); a becomes 1
b = -(b>>6); b becomes 2
I would think b's behaviour is more correct because -75>>6 = -2 and -(-75>>6) = 2.
Anyone know why sc_fixed with q_mode=SC_TRN should not behave like sc_int?
Thanks,
Sam