Finally I have tried to implement my desing with Mod Operator but all the design seems to fail. This is my code:
if(read = '1' and fifo_empty='0') then addr := (addr - 1)mod(2) end if;
Now I have read in a news group that MOD operator is not synthesizable when:
- A mod B when B is not a power of 2.
- A mod B when both A and B are not constant.
Exactly it says: "a mod b" means "the remainder when a is divided by b. Note that unless 'b' is a power of 2 or both a and b are constants, the mod operation is most likely not synthesizable.
The first sentence is perfect, but the second one involves that the operator has not sense.
Could someone tell me if this is true??
My best regards
Pablo