May 2, 2010 #1 M mo.khairy.mo Member level 2 Joined Dec 17, 2008 Messages 47 Helped 1 Reputation 2 Reaction score 0 Trophy points 1,286 Location Egypt Activity points 1,548 hi all when i write this VHDL code Code: if ((a = 0) | (b = 0)) then c <= (others=>'0'); end if; i found this error Code: Syntax error near "|" could anyone help me to fix this error thanks in advance
hi all when i write this VHDL code Code: if ((a = 0) | (b = 0)) then c <= (others=>'0'); end if; i found this error Code: Syntax error near "|" could anyone help me to fix this error thanks in advance
May 2, 2010 #2 FvM Super Moderator Staff member Joined Jan 22, 2008 Messages 52,510 Helped 14,757 Reputation 29,796 Reaction score 14,128 Trophy points 1,393 Location Bochum, Germany Activity points 298,468 VHDL syntax error "|" isn't a defined standard VHDL operator. Did you mean "OR"?
May 2, 2010 #3 M mo.khairy.mo Member level 2 Joined Dec 17, 2008 Messages 47 Helped 1 Reputation 2 Reaction score 0 Trophy points 1,286 Location Egypt Activity points 1,548 VHDL syntax error yeah i mean if either a=0 or b=0 and i don't want to check the result of a or b
May 3, 2010 #4 vipinlal Full Member level 6 Joined Mar 8, 2010 Messages 357 Helped 76 Reputation 152 Reaction score 60 Trophy points 1,308 Location India Activity points 3,191 Re: VHDL syntax error Write the code like this : Code: if ((a = 0) or (b = 0)) then c <= (others=>'0'); end if; --vipin https://vhdlguru.blogspot.com/
Re: VHDL syntax error Write the code like this : Code: if ((a = 0) or (b = 0)) then c <= (others=>'0'); end if; --vipin https://vhdlguru.blogspot.com/