Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Exponents in VHDL?

 
Thread Tools Search this Thread
Old 08-19-2004, 11:32 AM   #1
Default Exponents in VHDL?


How do we do implement the exponent function "6" in VHDL, i.e. as in 2^3=8.

cheers




Kwaj
  Reply With Quote
Old 08-19-2004, 12:03 PM   #2
Allan Herriman
 
Posts: n/a
Default Re: Exponents in VHDL?
On Thu, 19 Aug 2004 20:32:55 +1000, "Kwaj"
<> wrote:

>How do we do implement the exponent function "6" in VHDL, i.e. as in 2^3=8.


I assume you missed the shift key and actually meant "^" instead of
"6".

The VHDL operator for exponentiation is **, e.g. x**y

Many other languages use the same symbol, e.g. Verilog, Fortran, etc.

All simulators will support it.

Synthesisers will probably support it for any values of x and y if x
and y are both constant, but probably not support it if x isn't a
constant. If x is a constant and also a power of 2 (e.g. 2 or 4,
etc.) then most synthesisers will support variable y.

Regards,
Allan.


Allan Herriman
  Reply With Quote
Old 08-20-2004, 05:52 AM   #3
anupam
 
Posts: n/a
Default Re: Exponents in VHDL?
Hi,
U can implement the same by just pressing the * key 2 times ie.
2**3

I think it is helpfull 2 u .

Regards



anupam
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute an external software from VHDL? And how to interface VHDL with JAVA? becool_nikks Software 0 03-06-2009 07:08 PM
reading mp3 file in binary format in vhdl latheesh General Help Related Topics 0 02-05-2008 05:40 AM
Help on auto conversion from Matlab to vhdl on filter design hardheart Hardware 0 12-07-2007 09:19 AM
VHDL RAM help!:) lastval Hardware 0 11-09-2007 01:40 PM
ARRAY(n DOWNTO 0) OF STD_LOGIC_VECTOR(m DOWNTO 0) - VHDL freitass Hardware 0 11-01-2007 03:44 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46