abstract type signal

Discussion in 'VHDL' started by Ilya Kalistru, May 22, 2013.

  1. Hi everyone!

    I have a module, that makes some actions with signal S of the type myType. This actions with signal S is independent of its type.

    For using this modules for signals of various types I create a copies of module with another name and "Find and replace" myType to MyOtherType.
    I think that it is conceptually wrong way.

    Is there a way to define a signal of abstract data type and substitute the correct type in place abstract when I need use it? May I use "generic" for this purpose?

    --
    Best Regards,
    Ilya Kalistru
    Engineer looking for a complicated job.
    Ilya Kalistru, May 22, 2013
    #1
    1. Advertising

  2. Ilya Kalistru

    Rob Gaddi Guest

    On Wed, 22 May 2013 12:08:12 -0700 (PDT)
    Ilya Kalistru <> wrote:

    > Hi everyone!
    >
    > I have a module, that makes some actions with signal S of the type myType. This actions with signal S is independent of its type.
    >
    > For using this modules for signals of various types I create a copies of module with another name and "Find and replace" myType to MyOtherType.
    > I think that it is conceptually wrong way.
    >
    > Is there a way to define a signal of abstract data type and substitute the correct type in place abstract when I need use it? May I use "generic" for this purpose?
    >
    > --
    > Best Regards,
    > Ilya Kalistru
    > Engineer looking for a complicated job.


    That's a feature in VHDL-2008, and in my experience one that's not very widely supported yet.

    --
    Rob Gaddi, Highland Technology -- www.highlandtechnology.com
    Email address domain is currently out of order. See above to fix.
    Rob Gaddi, May 22, 2013
    #2
    1. Advertising

  3. Ilya Kalistru

    Andy Guest

    I agree with Rob, but notify your tool vendor(s) if they do not yet support it(generic types). This will help them prioritize implementation of 2008 features, and let the know that more customers want to use 2008 features.

    Andy
    Andy, May 23, 2013
    #3
  4. Ilya Kalistru

    Guest

    I had the same experience recently in which I had to make four almost-identical modules so I tried passing in the type as a generic, which looks like this:

    entity delay is
    generic (type DATATYPE);
    port (...

    In my notes I see that this was supported by my synthesizer (Synplify Pro) but not by Modelsim 10.1d, which despite being sold for ridiculous prices, does not support basic features from a standard from 2008, which if I calculate correctly, was FIVE YEARS AGO.

    Even if this feature is supported, it's not really that great. It would bepreferable to have an unconstrained type, so you could do something like this:

    signal internal_sig : data_in'type(data_in'range);

    Your other option is to use Verilog.
    , May 23, 2013
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DaKoadMunky
    Replies:
    4
    Views:
    551
    Lee Weiner
    Apr 20, 2004
  2. Matthias Kaeppler
    Replies:
    1
    Views:
    438
    R.F. Pels
    May 22, 2005
  3. Sameer
    Replies:
    4
    Views:
    601
    Roedy Green
    Aug 31, 2005
  4. Uzytkownik
    Replies:
    3
    Views:
    592
    Uzytkownik
    Apr 3, 2005
  5. Iyer, Prasad C

    Abstract Methods & Abstract Class

    Iyer, Prasad C, Oct 20, 2005, in forum: Python
    Replies:
    0
    Views:
    532
    Iyer, Prasad C
    Oct 20, 2005
Loading...

Share This Page