1
\$\begingroup\$

I want to compile my code but I get multiple errors surrounding a statement which is repeated several times in the architecture. The error message (Error 10500) says a ":" is missing near "when" but to me everything seems consistent. Part of the code is pasted below. As you see it complains about row 308 where an WHEN statement used.

I have checked this specific part and the entire code itself, but I don't find anything inconsistent about it. The conditional statement is terminated with a semicolon as it should and it is consistent with the syntax of a WHEN statement according to this webpage: http://www.ics.uci.edu/~jmoorkan/vhdlref/cond_s_a.html

Part of code in architecture

\$\endgroup\$
  • \$\begingroup\$ Welcome to the site. Please quickly realise that this is not a free design house, homework-answering service or an on-line technical encyclopedia, copied out to you on demand. People will help you take the next step if your question shows that you've done as much as you possibly could on your own - which your post doesn't, I'm afraid. Please revise your question showing your work and findings so far, in considerable detail. Or delete the question if Internet searches give you your answer anyway. Again, a warm welcome to the site. \$\endgroup\$ – TonyM Dec 8 '17 at 8:00
  • \$\begingroup\$ Make your question MUCH better in one go, not one change at a time. It doesn't even say what language this is or on what. \$\endgroup\$ – TonyM Dec 8 '17 at 8:00
  • \$\begingroup\$ By the way, I found the solution. It is not allowed to use WHEN statements inside a process. I changed it to if loops and it worked fine \$\endgroup\$ – bojee Dec 8 '17 at 9:28
  • \$\begingroup\$ That IS allowed if you turn on VHDL-2008 support ... assuming your tools support VHDL-2008, that is. \$\endgroup\$ – Brian Drummond Dec 8 '17 at 10:10
  • \$\begingroup\$ Yes - much better to keep WHEN statements out of processes. Keeps your VHDL simple and compatible with as much as possible, no need to narrow the field unnecessarily. \$\endgroup\$ – TonyM Dec 8 '17 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.