generate statement

Discussion in 'VHDL' started by crazyrdx, Sep 1, 2005.

  1. crazyrdx

    crazyrdx Guest

    In the generate statement, in the If- generation scheme,

    generate-label : if (expression) generate

    If I want to test more than one expression , how can I do this?

    Thanks
     
    crazyrdx, Sep 1, 2005
    #1
    1. Advertising

  2. crazyrdx

    Hubble Guest

    Why don't you use

    if (expression1) and (expression2) and (expression3) generate

    You can also use

    if (expression1) and (not (expression2)) or (expression3) generate

    Hubble
     
    Hubble, Sep 2, 2005
    #2
    1. Advertising

  3. crazyrdx

    Guest


    > generate-label : if (expression) generate
    >
    > If I want to test more than one expression , how can I do this?

    You can use AND or OR etc to combine expressions but the expression
    should be a function of your index. Also you should write all the cases
    exhaustively.
     
    , Sep 4, 2005
    #3
  4. crazyrdx

    Andy Peters Guest

    crazyrdx wrote:
    > In the generate statement, in the If- generation scheme,
    >
    > generate-label : if (expression) generate
    >
    > If I want to test more than one expression , how can I do this?


    Peter Ashenden's VHDL book has an excellent section on generates. You
    might consider buying that book and reading it ...

    -a
     
    Andy Peters, Sep 6, 2005
    #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. Isaac

    Error Generate Statement

    Isaac, Aug 7, 2003, in forum: VHDL
    Replies:
    3
    Views:
    2,401
    Keith Williams
    Aug 7, 2003
  2. Roman Zeilinger

    For Loop Generate Statement

    Roman Zeilinger, Sep 23, 2004, in forum: VHDL
    Replies:
    2
    Views:
    3,367
    Allan Herriman
    Sep 23, 2004
  3. Weng Tianxiang
    Replies:
    5
    Views:
    1,319
    Christophe
    Feb 16, 2006
  4. Replies:
    3
    Views:
    417
    red floyd
    Apr 7, 2006
  5. Harlan Messinger
    Replies:
    2
    Views:
    2,308
    John Bell
    Mar 28, 2010
Loading...

Share This Page