Legal syntax for VHDL expression

Discussion in 'VHDL' started by rickman, Feb 21, 2010.

  1. rickman

    rickman Guest

    I am writing a case statement and it doesn't seem to like an attribute
    as a selection expression. Is an attribute not a legal item in an
    expression?

    It flags an error at the "of" on the first line saying 'keyword "is"
    expected'
    and at the beginning of the last line shown here saying 'keyword "end"
    expected'

    case LFSRReg'high of
    when 2 =>
    Feedback := Feedback xor LFSRReg(2);
    Feedback := Feedback xor LFSRReg(1);
    when 3 =>

    I seem to get rusty on VHDL between projects, but I thought I knew how
    to construct a case statement. Am I just getting old?

    Rick
    rickman, Feb 21, 2010
    #1
    1. Advertising

  2. rickman

    rickman Guest

    On Feb 20, 8:57 pm, Alan Fitch <> wrote:
    > On 21/02/10 01:53, rickman wrote:
    >
    >
    >
    > > I am writing a case statement and it doesn't seem to like an attribute
    > > as a selection expression.  Is an attribute not a legal item in an
    > > expression?

    >
    > > It flags an error at the "of" on the first line saying 'keyword "is"
    > > expected'
    > > and at the beginning of the last line shown here saying 'keyword "end"
    > > expected'

    >
    > >      case LFSRReg'high of
    > >            when 2 =>
    > >              Feedback := Feedback xor LFSRReg(2);
    > >              Feedback := Feedback xor LFSRReg(1);
    > >            when 3 =>

    >
    > > I seem to get rusty on VHDL between projects, but I thought I knew how
    > > to construct a case statement.  Am I just getting old?

    >
    > > Rick

    >
    > The syntax is
    >   case expression is
    >
    > so replace "of" by "is",
    >
    > regards
    > Alan
    >
    > --
    > Alan Fitch


    Maybe I am working to hard. I even looked at a reference guide
    several times and kept reading "of" instead of "is"... If I'm not
    getting old, I guess I'm at least getting tired!

    Thanks a lot for the *really* fast reply!

    Rick
    rickman, Feb 21, 2010
    #2
    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. afd
    Replies:
    1
    Views:
    8,301
    Colin Paul Gloster
    Mar 23, 2007
  2. gabriele renzi
    Replies:
    2
    Views:
    200
    gabriele renzi
    Dec 31, 2005
  3. Jonathan Maasland

    Legal syntax, bug or what?

    Jonathan Maasland, Sep 1, 2006, in forum: Ruby
    Replies:
    1
    Views:
    91
  4. Ken Bloom
    Replies:
    3
    Views:
    204
  5. Good Night Moon
    Replies:
    9
    Views:
    278
    Rick DeNatale
    Jul 25, 2007
Loading...

Share This Page