EDAboard.com | EDAboard.eu | EDAboard.de | EDAboard.co.uk | RTV forum PL | NewsGroups PL

Legal syntax for VHDL expression

elektroda.net NewsGroups Forum Index - VHDL Language - Legal syntax for VHDL expression

rickman
Guest

Sun Feb 21, 2010 3:33 am   



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

Alan Fitch
Guest

Sun Feb 21, 2010 3:33 am   



On 21/02/10 01:53, rickman wrote:
Quote:
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

rickman
Guest

Sun Feb 21, 2010 3:33 am   



On Feb 20, 8:57 pm, Alan Fitch <a...@invalid.invalid> wrote:
Quote:
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

elektroda.net NewsGroups Forum Index - VHDL Language - Legal syntax for VHDL expression

Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
RTV map EDAboard.com map News map EDAboard.eu map EDAboard.de map EDAboard.co.uk map Opony