priversek
Newbie level 2
- Joined
- Nov 10, 2013
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 32
Hi
I am having trouble comparing two signed fixed point numbers in VHDL.
Below is code example.
It looks like compare is not working correctly.
When synthesizing above code I get Warning: "Net <max_reached> does not have a driver."
What am I doing wrong?
I have also tried to cast the signals as signed() on both sides of compare, but then simulation is not working in modelsim, because I receive error: "index value -30 is out of std.standard.natural range 0 to 2147483647".
Please help, I am really stuck here...
Thanks
I am having trouble comparing two signed fixed point numbers in VHDL.
Below is code example.
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 signal kot : sfixed(2 downto -30); signal delta_kot : sfixed(2 downto -30):="000000000000001111111111111111111"; constant half_pi : sfixed (2 downto -30) := to_sfixed(1.57,2,-30); ... if ( (kot + delta_kot) > half_pi ) then max_reached <= '1'; ...do something... else kot <= resize(kot + delta_kot, kot); end if;
It looks like compare is not working correctly.
When synthesizing above code I get Warning: "Net <max_reached> does not have a driver."
What am I doing wrong?
I have also tried to cast the signals as signed() on both sides of compare, but then simulation is not working in modelsim, because I receive error: "index value -30 is out of std.standard.natural range 0 to 2147483647".
Please help, I am really stuck here...
Thanks