I'm creating a VHDL project (Xilinx ISE for Spartan-6) that will be required to use decimal "real-style" numbers in either fixed/floating point (I'm hoping fixed point will be sufficient).
Being quite new to VHDL, I found out the hard way that the non-constant real
types are not supported for synthesis, so I set about searching for a IP core or library to redress this.
So far I've found 3 options;
1) A floating point IP core provided by Xilinx
2) A downloadable "ieee_proposed" library written by a David Bishop found here
3) After spending a fair while attempting to work out how to "create" a new library with David Bishops files in, I took a quick look through the default IEEE
library and saw it contains ieee.fixed_generic_pkg
and ieee.fixed_pkg
packages.
My question is - of the two libraries - which one would be sensible to use? Is one adapted for synthesis and one not, or one older than the other? And then if floating point is provided, is there any real point to the floating point IP core provided by Xilinx?
I've trawled through many questions of people attempting to add the ieee_proposed
libraries, but none seem to have referenced the fact they they already seem to exist in the existing IEEE
.
Thanks very much for any help!
============UPDATE (Essentially my own efforts to resolve)==================
I can't actually use the ieee.fixed_pkg
- and attempting to do so gives me the error Cannot find <fixed_pkg> in library <ieee>
.
After finding the ieee library at C:\Xilinx\14.7\ISE_DS\ISE\vhdl\xst\nt I've found that the fixed_pkg
actually resides in ieee_proposed. However, this still throws up the same errors!
Dumb question, but when you downloaded the ieee_proposed did you also remember to compile it?
edit: And also remember to map the library to you simulation as well. Maybe you did all this already but these are the mistakes I make often.
I've been battling with the same problems for days. The way I solved it is: 1. Add fixed_float_types_c, fixed_pkg_c and float_pkg_c vhdl files to project. 2. Declare them as belonging to work library (Properties in Quartus files window) 3. Compile project and call library using: Library work; use work.fixed_pkg.all;
To my annoyance, they don't come up in the nice red writing I want them to but it works!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With