Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

representation of equation in vhdl

Altera_Forum
Honored Contributor II
1,446 Views

sir, 

 

how can write l{n-(N-1)/2}l in vhdl???
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
527 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
527 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
527 Views

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

0 Kudos
Reply