Forum Discussion
3 Replies
- Altera_Forum
Honored Contributor
If n is an unsigned, signed or integer signal or variable and N is a constant, you can simply write the expression. Refer to a VHDL text book.
- Altera_Forum
Honored Contributor
sir, i want the mod value of this expression,for example,if the output is -4,i should have it as +4,etc.
- Altera_Forum
Honored Contributor
you can use the abs() function for that purpose. It should work on both integer and unsigned types.