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.

VHDL- Floating Numbers with STD_LOGIC_VETOR

Status
Not open for further replies.

jose2

Newbie level 5
Joined
May 10, 2009
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,339
To All;


How can I manage a floating number using STD_LOGIC_VECTOR?
For example (0.75 - 1.00) = -0.25.
How that operation can be represented using STD_LOGIC_VECTOR?


Thanks in advance;

JEM
 

You can declare it in variable or constant.however,real is not synthesizable.You can just simulate the result and see.
 

I remember, that you have started a similar thread some weeks ago and I think, I mentioned possible float representations Generally, the problem hasn't to do with std_logic_vector. That's just an array of bits, that can represent everything but doesn't give any information about the underlying number format. You have to decide about a suitable number format for your application, e.g. IEEE single precision and use a float library from your FPGA vendor or a second party, or the IEEE float package mentioned in your previous thread, or design something on your own.

however,real is not synthesizable
That's correct, if you think of ieee.math_real library.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top