- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was looking for the fixed-point libraries for fixed-point and floating-point arithmetic's from David Bishop, they used to be here http://www.vhdl.org/fphld/vhdl.htmbut now the website is gone. Any idea where can i get the package? or what happened to the website?
Thanks.Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
They are not cores, they are '93 compatible versions of VHDL2008 standard libraries. As far as I can tell this code is not available on opencores.
I have found a version available here: https://github.com/ctn-waterloo/nef-fpga/tree/master/contrib/fixed_pkg Though this appears not to be the altera specific version that was created, I remember that the altera version was fairly identical to the base package. To try an improve things - ask altera for an enhancement request to include the library with their quartus distribution, or even better - get full VHDL 2008 support.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quartus Prime Pro 15.1 has the fixed_pkg included in the distribution. It is only the '93 compatability version though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tricky, have you tried to work with it?
I can see the packages in Modelsim under "ieee" and also simulate them. However when I try to synthesize (now in Quartus) my little test design I get this error: Error (10481): VHDL Use Clause error at test_controller.vhd(33): design library "ieee" does not contain primary unit "fixed_float_types". Verify that the primary unit exists in the library and has been successfully compiled. Error (10800): VHDL error at test_controller.vhd(33): selected name in use clause is not an expanded name- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fixed_float_types package is simply to control the other packages via generics. Given that Quartus does not support generics on packages, then this package is rather useless. Having looked at the code that comes with prime pro - it looks like its the old '93 compatability pacakages rather than the proper 2008 version.
What are you trying to do?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to use fixed point arithmetic. :) I'm porting an old DSP algorithm to an FPGA and would like to avoid using floating point because it awfully bloats my FPGA.
I still have David Bishop's user’s guide here and in there on page 1 he writes to use these two files: use ieee.fixed_float_types.all; -- ieee_proposed for vhdl-93 versionuse ieee.fixed_pkg.all; -- ieee_proposed for compatibility version
So I used the ones with the same name that come with Modelsim and it seems to do what it is supposed to do in simulation. For synthesis it apparently doesn't work like that. Probably I should have added that I get the same error for fixed_pkg.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you set the compilation settings to VHDL 2008?
Otherwise you'll have to include your own copy of the code.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PS. you can do all the same stuff without using the fixed_pkg and only using the numeric_std package. All the fixed package does is offset the integers in the code (it's otherwise identical on the FPGA).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I already went to Assignments -> Settings -> VHDL input, but 1993 or 2008 makes no difference.
I'm just noticing you wrote Quartus Prime Pro, I'm using Lite. I hope it's not that. As far as not using fixed_pkg at all, I don't know how involved that is. With the package it seems, - I can easily declare variables - just use operators without having to worry about the decimal point - use resize etc. Reinventing the wheel is prone to introducing errors, whilst a mature package already exists. I still have David Bishop's stuff downloaded. Maybe I'll get that to work. I'm sure people have succeeded doing that.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Afaik, the 2008 libraries are only included in prime pro - otherwise you have to provide the code as part of your project. But quartus has worked just fine with the compatability packages since at least 2009, where I was using it to infer multipliers and rams from ufixed and sfixed.
Using numeric_std is actually the "normal" way to do it. fixed_pkg actually re-invents the wheel and is hardly used. numeric_std has been around since 1993 and has arithmatic, resize() etc. But yes, you have to track the integer/fraction separation yourself, but it's not that hard to do - it just takes a little thinking. And to be fair, if you ever have to use the altera lpm library (for a divider for example), you'll have to convert everything to slv anyway.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page