Forum Discussion
Altera_Forum
Honored Contributor
15 years agoDevide in VHLD
I want to implement this function : A<= B/x"A", when I compile, the Quartus put a notice: "/" used but didn't declare. When I try with "*" (multiply) or "+" (add), it is ok. I don't know this er...
Altera_Forum
Honored Contributor
15 years agowhat you want to do is take the absolute of A and B, but also store the signedness of them and follow these rules:
If A and B are the same (ie. both positive or both negative), then result is positive. If A and B are different, then the result is negative. At the moment, you only ever create a postive result because you only ever add 1. You need to stick the XOR of MSBs of A and B into a shift register and then negate the output when needed.