| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#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 |
|
#2
| |||
| |||
| 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 |
|
#3
| |||
| |||
| 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 |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.