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.

How do you implement X^2.5???

Status
Not open for further replies.

khaila

Full Member level 2
Joined
Jan 13, 2007
Messages
121
Helped
5
Reputation
10
Reaction score
1
Trophy points
1,298
Activity points
2,105
I have asked about implemetation of X^2.5 while X is a vector of 8-bit.
No alhorith implemetaion is required.

I have suggested the following solution:
X^2.5= X^2*X^0.5
for X^2 I will use simple multiplier(X*X).
X^0.5 I will use ROM.
then I will multiply the results.
 

Hi,

if you want to use a table for X^0.5, why do you not use a table for the X^2.5?
maybe this is better than a sqrt table and 3 multipliere

regards
 

Having a number multiplied by 0.5 will need less memory than by 2.5. 100^0.5=10, while 100^2.5=100000. However, in this situation, having a table for X^2.5 could be the best solution, which also saves a multiplier.
 
  • Like
Reactions: khaila

    khaila

    Points: 2
    Helpful Answer Positive Rating
Hi,

if you have a 8bit input you need always a memory with 256 entries.
the width may be different for x^0.5 and x^2.5

regards
 

You can made combinational table and compare area with ROM+multipliers.

Code:
module x25(inx, out_x);
input [7:0] inx;
output [19:0] out_x;
assign out_x = 
inx==8'd0	?	20'd	0	:
inx==8'd1	?	20'd	1	:
inx==8'd2	?	20'd	6	:
inx==8'd3	?	20'd	16	:
...
 

Having a number multiplied by 0.5 will need less memory than by 2.5. 100^0.5=10, while 100^2.5=100000. However, in this situation, having a table for X^2.5 could be the best solution, which also saves a multiplier.

you suggerst two soluations:
1. implement all the equation by using memory only.
2. using less memory but using also 3 multipliers.

which soluation is better for ASIC and whichfor FGPA? is there any other consideration?
 

you suggerst two soluations:
1. implement all the equation by using memory only.
2. using less memory but using also 3 multipliers.

which soluation is better for ASIC and whichfor FGPA? is there any other consideration?

I have never worked with ASICs and my FPGA knowledge is beginner level :) If there will be no multipliers used later - then the multiplier one, since memory is always useful for different operations (at least in fpgas)
 

Hi,

I assume for such a small table the hardcoded version from kornukhin is the cheapest solution.

regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top