compiler errors when compiling *.vhdl into a library - Altera Quartus II

后端 未结 2 493
無奈伤痛
無奈伤痛 2021-01-28 17:05

I\'ve downloaded the floating point package from http://www.vhdl.org/fphdl/ and did the following:

  1. I included the math_utility_pkg.vhd, fixed_pkg_c.vhd and float_p
相关标签:
2条回答
  • 2021-01-28 17:45

    You may wish to re-download the packages. I don't see a math_utility_pkg and I don't see library floatfixlib referenced in the packages. You must have a very old release.

    I just re-downloaded the Altera distribution. In it, I see the packages referenced in the post you cross listed: fixed_float_types_c.vhdl, fixed_pkg_c.vhdl, and float_pkg_c.vhdl. I also note that the file date stamps in the zip file are: 8/27/2009.

    0 讨论(0)
  • 2021-01-28 17:47

    I looked at: pastebin.com/TUtGax7M

    It looks like the packages compile and you are trying to compile your design and it is failing on a call to "to_float". Without seeing the code, I can only guess. The call to to_float needs to determine the range of the result either by passing it the object (first assignment below) or the indices of the result (second assignment below).

    signal A_fp32 : float32 ;
    . . .
    
    -- Real and/or Integer Literal
    A_fp32 <= to_float(6.5, A_fp32); -- size using A_fp32
    A_fp32 <= to_float(6.5, 8, -32); -- pass indicies
    

    I also see the call to divide failing. Note that divide is on the bleeding edge of synthesis. Vendors may or may not support divide. Short story is you will probably need to submit a bug report against the divide and instead use their macro/wizard. Note if they support a macro/wizard for divide, then they can do synthesis, it is just to their advantage to keep you using their vendor specific code as much as possible.

    0 讨论(0)
提交回复
热议问题