title: How does signal assignment work in a process?
body: <p>I learned that a signal is not changed immediately when encountering an expression, but when the process ends. In this example here:</p>
  
  <pre><code>...
  signal x,y,z : bit;
  ...
  process (y)
  begin
    x&lt;=y;
    z&lt;=not x;
  end process;
  </code></pre>
  
  <p>The example says this:</p>
  
  <p><em>If the signal y changes then an event will be scheduled on x to make it the same as y. Also, an event is scheduled on z to make it the opposite of x. The question is, will the value of z be the opposite of y? Of course, the answer is no, because when the second statement is executed, the event on x has not been processed yet, and the event scheduled on z will be the opposite of the value of x before the process begins.</em></p>
  
  <p>Well, I need to understand some things:</p>
  
  <ol>
  <li>From what I learned, signals values are updated only <strong>at the end of the process</strong>. Is this correct?</li>
  <li>The signal <code>x</code> is updated as the first statement. This does not still change the value of <code>x</code>, this change is put in a queue to be executed after the process ends. So everything after this statement <code>x &lt;= y</code> will not see the change and will see <code>x</code> having its old value. Is this correct?</li>
  <li>The second statement is an attempt to change the value of signal <code>z</code>. The same here, z will not change its value but it depends on the value of another process. The change on <code>z</code> will be put in queue to be executed at the end of the process. Is this correct?</li>
  </ol>
  
  <p>What does happen at the end of the process?</p>
  
  <p>Possibility number 1) The value in <code>x</code> is changed so x has its new value. The second signal <code>z</code> is updated, the first signal <code>x</code> was updated and, given that <code>z</code> depends on <code>x</code>, its value is changed basing on the NEW UPDATED value of <code>x</code>. And the example should work fine.<br></p>
  
  <p>Possibility number 2) The value in <code>x</code> is changed so x has its new value. The second signal <code>z</code> is updated. Given that <code>z</code> was assigned an old value of <code>x</code>, that's the value that <code>z</code> will hold, the old value of <code>x</code> which was updated, but this update is not considered.</p>
  
  <p>Could you please tell me which one is the correct way?</p>