Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Use package with selected function

 
Thread Tools Search this Thread
Old 08-12-2008, 08:09 AM   #1
Default Use package with selected function


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
  Reply With Quote
Old 08-12-2008, 09:18 AM   #2
Tricky
 
Posts: n/a
Default Re: Use package with selected function
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
  Reply With Quote
Old 08-12-2008, 12:22 PM   #3
Flo
 
Posts: n/a
Default Re: Use package with selected function
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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46