Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

float_pkg help required

Altera_Forum
Honored Contributor II
1,792 Views

Hi folks, 

 

I want to use the float_pkg in my vhdl code to convert an integer to float (1 sign, 8 exp, 23 mantissa) to pass a value onto one of the float megafunctions provided by altera! However i cant seem to work out which libraries I need to include. 

 

I did some reading on the web and have got some stuff for VHDL '93 (float_pkg, fixed_pkg and fixed_float_types vhdl code) and have them compiled into the suggested ieee_proposed library and that seem to be ok for now. BUT... 

 

I thought these packages were now part of the numeric.std library and therefore I shouldnt need to use the VHDL 93 method for float calculations/conversions. If I use the VHDL '93 stuff will modelsim complain at me when I come to simulate, or would I be better off using a VHDL 2008 version, and if so how? 

 

Somewhat confused I am! 

 

Many thanks 

D
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
1,067 Views

The fixed and float packages are part of the VHDL 2008 standard compiled into the IEEE library. But vendors are very very slow at fully supporting the full 2008 standard so you have to use the '93 compatible versions of the libraries for now. Modelsim 10.1+ shouldnt complain because it does have full 2008 support.  

 

But I would NOT use the float_pkg at all at the moment because it has no pipelining capabilities. Integer-> float conversion is non trivial and there is an IP block for it in the IP library.
0 Kudos
Altera_Forum
Honored Contributor II
1,067 Views

Thanks Tricky, 

I have to confess I hadnt even spotted it in the megafunction list. ;-) 

D
0 Kudos
Reply