biju4u90
Full Member level 3
- Joined
- Dec 10, 2014
- Messages
- 172
- Helped
- 3
- Reputation
- 6
- Reaction score
- 3
- Trophy points
- 18
- Activity points
- 1,437
I define two signals present_state and next_state as below in VHDL.
type state is (reset_state, AA_55_state, FF_00_state, ring_1_state, ring_0_state);
signal present_state : state;
signal next_state : state;
In the code, I want to check whether present_state is equal to next_state or not and assign a value to count accordingly.
when I give like
if (clk = '1' and clk'event) then
if ((present_state) = (next_state)) then
count <= '0'
its working perfectly. But if I write like
if (clk = '1' and clk'event) then
if ((present_state) /= (next_state)) then
count <= '0'
I don't get any error, But count doesn't get the assiged value.
Can't I use the "not equal to" operator for comparing two user defined type signals?
type state is (reset_state, AA_55_state, FF_00_state, ring_1_state, ring_0_state);
signal present_state : state;
signal next_state : state;
In the code, I want to check whether present_state is equal to next_state or not and assign a value to count accordingly.
when I give like
if (clk = '1' and clk'event) then
if ((present_state) = (next_state)) then
count <= '0'
its working perfectly. But if I write like
if (clk = '1' and clk'event) then
if ((present_state) /= (next_state)) then
count <= '0'
I don't get any error, But count doesn't get the assiged value.
Can't I use the "not equal to" operator for comparing two user defined type signals?