I'm not able to write vhdl syntax. But for the exam we must be able to read and interpret it.

The essence of the code is

    c := 0;
  end if;

  if ( c )
     c := false;
     c:= true;
 end if;


Assuming that c=1 (is a variable) in the beginning. I'm having difficulties interpreting what happens here


Since the statements are inside a process they will execute sequentially just like software.


If you have use ieee.std_logic_1164.all; and start is set to true or 1 elsewhere in the code, then if ( c ) would evaluate to false the else branch would be executed. Then c will be set to false and will retain that value until the next time this process executes (or some other process or combinatorial statement changes it).

If you don't have use ieee.std_logic_1164.all; the behavior is dependent on the compiler/synthesizer.


There is a lot of code missing so I'm making a lot of assumptions here but hopefully you get the basic meaning.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.