calculate power of float number

Guest #6057245
Rate this post
• ▲ useful
▼ not useful
I try to calculate y=2.5^x. y([0,2048)) is output which is 11 bits 
positive int and x([0,8)) is 6 bit which will fixed-point with 3 digits 
decimal and 3 digits fractional.


I write this module;

module prime(
    input [5:0] x,
    output [10:0] y
    );
    assign y = ((5'b11001)/(4'b1010))**( x / (10'b1111101000));
endmodule

RTL scheme : https://hizliresim.com/1ploYN

But it did not work. Also, I upload RTL scheme, x is not attached.
What is the reason for this? Could not verilog make a calculation with 
float numbers with this method?
Attached files:

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.