samng Posted July 5, 2013 Report Share Posted July 5, 2013 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 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.