How does signal assignment work in a process?

后端 未结 3 1218
挽巷
挽巷 2020-11-28 12:35

I learned that a signal is not changed immediately when encountering an expression, but when the process ends. In this example here:

...
signal x,y,z : bit;
         


        
3条回答
  •  我在风中等你
    2020-11-28 12:50

    I disagree with Ashraf's post. I have made vhdl code myself where variables are wires, and signals are latches. Examples:

    signal x,y,clk; process(clk) begin x <= y end process

    This creates a synchronous latch, a flip flop.

    Any variable which does not assign its value to a signal, but only to other variables, is a perfectly acceptable "wire".

    My understanding of the whole subject is this:

    A signal assignment inside a process will disregard other signal assignments made in the same process "instantiation". Also, for the same signal, only the last assignment will be taken into account.

    About "Ok END OF THE PROCESS: What does it happen?????":

    I think that a signal assignment will take place at the fastest possible time the hardware utilization of the process allows. EXCEPTION: Changes within a if(rising_edge(clk)) will take place at the start of the next clock cycle.

提交回复
热议问题