Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Division by a power of 2 in VHDL

Status
Not open for further replies.

chaitu2k

Member level 3
Member level 3
Joined
Apr 27, 2004
Messages
55
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
501
vhdl power operator

hi all

does VHDL IEEE 1997 support Division by a power of 2 .....if yes can u send me the syntax to use it in my code...or any links where this is given for reference...

cheers
 

divide by power of 2

If you must divide a integer number by a power of 2 you can use this formula:if a
is a is an integer n = a/(2^y) => (n = a >> y)

Hi
 
vhdl power of 2

Or in human language : just shift your value ;-)
 

vhdl power

You don't need any shift at all for divisio by power of 2. Just connect wires in appropriate way. For example, division by 4:

A_OUT(13 downto 0)<=A_IN(15 downto 2);
A_OUT(15 downto 14)<="00";
 

vhdl power of

Hi..
I found "/" operator in ALTERA -MAX PLUS10.2 version which supports vhdl'93. and i was getting expecting results... but it was generating lot of glitches.... it depends on the frequency which ur working...... i think its a LPM ( library parameterized module) which u can use for ur fpga...

jay
 

2**2 in vhdl

hi all

thanks for ur feedback...i did know abt n = a/(2^y) => (n = a >> y)....but i wanted to implement 16bit/16bit division.. denominator is a power of 2...in less than 20 slices...which was posing the problem...i was able to do it in 28 slices...if anyone can beat it its gud....

cheers
PS does anyone have documents realting to efficient slice utilization coding or something like tht....i need to learn to code to optize for area.....
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top