![]() |
|
|
|||||||
![]() |
VHDL - Use package with selected function |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi everyone,
Here is the syntaxe you usually use to include packages: use ieee.std_logic_arith.all Now, if I only want the + function included, I know that you can use use ieee.std_logic_arith."+" Is it possible to include a whole package without one particular function like : use ieee.std_logic_arith."all \+" to get the whole arith but without plus? thanks a lot. Florent Flo |
|
|
|
|
#2 |
|
Posts: n/a
|
Hi Flo
First off, change over from using std_logic_arith (and I also assume you have std_logic_unsigned somewhere) and use numeric_std instead. It is an actual standard, which is defined by the IEEE. The std_logic_arith library is vendor defined and varies from vendor to vendor, so makes your code less portable. There was a link somewhere to a document that showed the differences between two vendors definitions of std_logic_arith, and difference was quite significant right down to one vendors functions having completly different names, but I cant find it atm. Secondly, why would you want to ignore a single function? are you trying to overload it? This I think you can do simply by defining a new version in a more local scope, eg the architecture body. Otherwise, just create a function with a different name. Flo wrote: > Hi everyone, > > Here is the syntaxe you usually use to include packages: > use ieee.std_logic_arith.all > > Now, if I only want the + function included, I know that you can > use > use ieee.std_logic_arith."+" > > Is it possible to include a whole package without one particular > function like : > use ieee.std_logic_arith."all \+" to get the whole arith > but without plus? > > thanks a lot. > > Florent Tricky |
|
|
|
#3 |
|
Posts: n/a
|
Hi,
thanks for the tips about numeric. Regarding the use, it's not for ieee package especially (maybe for personnal packages).I have no particular use for that (but might get soon if it's possible to do so) I was just wondering if it was possible... florent On 12 août, 04:18, Tricky <Trickyh...@gmail.com> wrote: > Hi Flo > > First off, change over from using std_logic_arith (and I also assume > you have std_logic_unsigned somewhere) and use numeric_std instead. It > is an actual standard, which is defined by the IEEE. The > std_logic_arith library is vendor defined and varies from vendor to > vendor, so makes your code less portable. There was a link somewhere > to a document that showed the differences between two vendors > definitions of std_logic_arith, and difference was quite significant > right down to one vendors functions having completly different names, > but I cant find it atm. > > Secondly, why would you want to ignore a single function? are you > trying to overload it? This I think you can do simply by defining a > new version in a more local scope, eg the architecture body. > Otherwise, just create a function with a different name. > > Flo wrote: > > Hi everyone, > > > Here is the syntaxe you usually use to include packages: > > use ieee.std_logic_arith.all > > > Now, if I only want the + function included, I know that you can > > use > > use ieee.std_logic_arith."+" > > > Is it possible to include a whole package without one particular > > function like : > > use ieee.std_logic_arith."all \+" to get the whole arith > > but without plus? > > > thanks a lot. > > > Florent Flo |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| equivalent function for itoa in Linux gcc compiler | suse | Software | 0 | 03-06-2009 05:30 AM |
| enterprisedb package execution | kanchuparthi.rams | Software | 0 | 05-22-2008 01:59 PM |
| How to assign a returns value of a javascript function to a hiddenfield in a webpart | Chander | Software | 0 | 12-20-2007 09:14 AM |
| how to pass selected item from listbox of one form to text box of other form | chintan | Software | 0 | 12-19-2007 11:38 AM |
| The Practice Test Package Development: A New Service on the Certification Market | David Johnson | A+ Certification | 0 | 01-19-2005 10:52 AM |