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

digital design using vhdl

Altera_Forum
Honored Contributor II
1,524 Views

is any vhdl operators to calculate the power of numbers...... 

plz help me.. 

very urgent
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
866 Views

in VHDL you can use the ** operator to get x^y 

 

like this: 

 

a <= b ** c; where a, b and c are all integer. 

 

But if you want to synthesize it, one of either the B or C values needs to be a constant.
0 Kudos
Altera_Forum
Honored Contributor II
866 Views

Thank u sir. 

One more doubt is any symblols to do logical operations like and or exor like C programming.... 

 

 

greetings sir
0 Kudos
Altera_Forum
Honored Contributor II
866 Views

a <= b xor c; 

 

but you cant do logic operations on integers, because they are not logic types. you have to do them on std_logic/vector/signed/unsigned.
0 Kudos
Reply