Forum Discussion
Altera_Forum
Honored Contributor
15 years agorepresentation of equation in vhdl
sir,
how can write l{n-(N-1)/2}l in vhdl???3 Replies
- Altera_Forum
Honored Contributor
you can use the abs() function for that purpose. It should work on both integer and unsigned types.
- 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
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.