nested if-elsif-then Vs case

Discussion in 'VHDL' started by palo, Apr 25, 2007.

  1. palo

    palo

    Joined:
    Apr 23, 2007
    Messages:
    6
    Hi.
    I had a tutorial assignment to compare the resource and time consumption of an 8-to-3 encoder when using a nested if and case scheme.

    after synthesis the results were comparable:

    priority encoder

    # IOB - 12
    # DFF / Latch - 0
    # LUT - 8
    # Slices - 4
    Delay - 12.271 ns

    non-priority encoder

    # IOB - 12
    # DFF / Latch - 0
    #LUT - 9
    # Slices - 5
    Delay - 12.445 ns

    from this it seems that the nested if construcition is better when it comes to resource consumption. However, the case code 'looks' better and is easily readable and doesn't require so thorough analysis as the nested if code sometimes does.

    Is this a general rule? I mean are the if constructions less 'hungry' but less readable? :)
    Last edited: Apr 25, 2007
    palo, Apr 25, 2007
    #1
    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. unexpected

    Avoiding if..elsif statements

    unexpected, Aug 25, 2006, in forum: Python
    Replies:
    11
    Views:
    580
    Tal Einat
    Aug 27, 2006
  2. michaelb
    Replies:
    0
    Views:
    459
    michaelb
    Sep 30, 2006
  3. karlwijk

    if/elsif problem

    karlwijk, Apr 16, 2007, in forum: VHDL
    Replies:
    3
    Views:
    661
    quantum_dot
    Apr 18, 2007
  4. Brad Smallridge

    one hot machine without elsif

    Brad Smallridge, Feb 16, 2009, in forum: VHDL
    Replies:
    10
    Views:
    787
  5. BodiKlamph@gmail.com

    Help. SessionID is x then y then x then y

    BodiKlamph@gmail.com, Sep 3, 2005, in forum: ASP General
    Replies:
    0
    Views:
    273
    BodiKlamph@gmail.com
    Sep 3, 2005
Loading...

Share This Page