Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20705 Discussions

representation of equation in vhdl

Altera_Forum
Honored Contributor II
1,206 Views

sir, 

 

how can write l{n-(N-1)/2}l in vhdl???
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
287 Views

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.

0 Kudos
Altera_Forum
Honored Contributor II
287 Views

sir, i want the mod value of this expression,for example,if the output is -4,i should have it as +4,etc.

0 Kudos
Altera_Forum
Honored Contributor II
287 Views

you can use the abs() function for that purpose. It should work on both integer and unsigned types.

0 Kudos
Reply