cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SerkanKas
Visitor
Visitor
511 Views
Registered: ‎10-02-2020

Creating 64 bit signed number with floating point. (VHDL)

Jump to solution

Hello Folks, as you can guess from my question, I'm NewBie/Rookie about FPGA and VHDL.

I want to learn how to create a 64-bit number.

1.JPG

Let say this is the structure of the number I want to make, how can I do it? Is there a common way that everybody applies? I just wonder how things work in VHDL.

I appreciate your interest and thank you already.

0 Kudos
Reply
1 Solution

Accepted Solutions
bruce_karaffa
Scholar
Scholar
502 Views
Registered: ‎06-21-2017

You are not showing a floating point number.  A floating point number has a mantissa and an exponent.  You are simply showing a 64 bit, signed fixed point number format.  So you want signed(63 downto 0).  In hardware, it is up to you to keep track of the binary point, the circuitry doesn't change.

View solution in original post

6 Replies
drjohnsmith
Teacher
Teacher
504 Views
Registered: ‎07-09-2009
Hi
on basis it looks like you might be new to HDLs or FPGAs , a quick word.

FPGAs are hardware,
floating point makes a lot of hardware,
chips have limited amounts of hardware in them.

Although floating point is possible and well supported by the floating point libraries, it is due to the high "silicon cost" VEYR VERY VERY rarely actually used. Almost all algorithms can be replaced with fixed point, which is very much less hardware.

So tell us some more about why you want to use 64 bit floats ?
is this a real need or a paper work exercise in how to do it.

This might give you some pointers

https://www.xilinx.com/products/intellectual-property/floating_pt.html




<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
bruce_karaffa
Scholar
Scholar
503 Views
Registered: ‎06-21-2017

You are not showing a floating point number.  A floating point number has a mantissa and an exponent.  You are simply showing a 64 bit, signed fixed point number format.  So you want signed(63 downto 0).  In hardware, it is up to you to keep track of the binary point, the circuitry doesn't change.

View solution in original post

SerkanKas
Visitor
Visitor
488 Views
Registered: ‎10-02-2020
So what you say is, I still put as a 64-bit number, then when I process data, I use like however I want doesn't matter which point I would like to get as a floating-point. Did I get it correctly or did I miss something?
0 Kudos
Reply
SerkanKas
Visitor
Visitor
484 Views
Registered: ‎10-02-2020
I just try to understand things. I knew some programming languages have a specific amount of bits to store floating points and so on. If I want to replace that high-level programming code with lower-level implementation, I need to learn these types of things. That's the main reason. and, thanks for the links you gave me, I'm going to check deeply.
0 Kudos
Reply
drjohnsmith
Teacher
Teacher
482 Views
Registered: ‎07-09-2009
This is a good free resource on the VHDL side of things,
http://freerangefactory.org/
<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
SerkanKas
Visitor
Visitor
469 Views
Registered: ‎10-02-2020
I had this book, and keep learning from it, thanks for sharing.
0 Kudos
Reply