T
Toby
Guest
What are some specific problems with the std_logic_arith library? From
what I am reading in these forums, it is better to use numeric_std, why
exactly is it better? Any general answers on this issue would be
great.
Also, what I have been doing is simple arithmetic on std_logic_vectors
(using std_logic_arith library). Sometimes it works and sometimes it
doesnt. I understand that it is better to used signed or unsigned
types for arithmetic operations and I am in the process of changing my
code to do that, I am just trying to understand some of what I have
seen. For example, for std_logic_vector signals A and B (using
std_logic_arith), the following code seems to work in one part of my
code, but the exact same code doesnt work if I put it in another part
of the code:
IF (A - B > 400) Then
blah blah blah
It seemed like if B was an input port (an actual entity input), it
behaves differently than if B is a signal. Also seemed different if I
put this line of code in a different process (i.e. everything wasn't
concurrent like it is supposed to be). I dunno, anyone seen any
wierdness like this?
what I am reading in these forums, it is better to use numeric_std, why
exactly is it better? Any general answers on this issue would be
great.
Also, what I have been doing is simple arithmetic on std_logic_vectors
(using std_logic_arith library). Sometimes it works and sometimes it
doesnt. I understand that it is better to used signed or unsigned
types for arithmetic operations and I am in the process of changing my
code to do that, I am just trying to understand some of what I have
seen. For example, for std_logic_vector signals A and B (using
std_logic_arith), the following code seems to work in one part of my
code, but the exact same code doesnt work if I put it in another part
of the code:
IF (A - B > 400) Then
blah blah blah
It seemed like if B was an input port (an actual entity input), it
behaves differently than if B is a signal. Also seemed different if I
put this line of code in a different process (i.e. everything wasn't
concurrent like it is supposed to be). I dunno, anyone seen any
wierdness like this?