Forum Discussion
Altera_Forum
Honored Contributor
10 years agoModelsim error
Hii i am using Modelsim student edition for the simulation of my edge detection code. I am getting the following error.... ** Error: fixed_pkg Unbounded number passed, was a literal used?** ...
Altera_Forum
Honored Contributor
10 years agodx and dy are declared as sfixed(), but you're trying to convert it to ufixed. There is no to_ufixed function from sfixed because such a thing would not make much sense. If you really insist on using ufixed, you need to type cast it yourself via:
mod_d <= to_unsigned(ufixed(resize((abs(dx)+abs(dy)),7,0))); --Resize the result to 8 bits But given dx and dy are signed - im guessing things are going to start to go wrong..