Use package with selected function

F

Flo

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
 
T

Tricky

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.
 
F

Flo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,130
Latest member
MitchellTe
Top