I'm new to VHDL. I heard that signal assignment only updates at the end of a process and will only use the most recent assignment, so I wanted to test it out. How come the value for temp did not update at the end of the first process(i=0) even though I already have an initial value for a,b,c? It only started updating the value for temp on the second iteration(i=1).
Code I used to test:
architecture Behavioral of test is
signal a : integer := 1;
signal b : integer := 2;
signal c : integer := 3;
signal i : integer := 0;
signal temp, temp2 : integer;
begin
process is
begin
report "-----Start Here-----(" & integer'image(i) & ")";
temp <= a; report "1:" & integer'image(temp);
temp <= b; report "2:" & integer'image(temp);
temp <= c; report "3:" & integer'image(temp);
temp2 <= a; report "4:" & integer'image(temp2);
temp2 <= temp; report "5:" & integer'image(temp2);
report "-----End Here----------------------------";
i <= i + 1;
wait for 10ns;
end process;
end architecture;
OUTPUT:
-----Start Here-----(0)
1: -2147483648
2: -2147483648
3: -2147483648
4: -2147483648
5: -2147483648
-----End Here----------------------------
-----Start Here-----(1)
1: 3
2: 3
3: 3
4: -2147483648
5: -2147483648
-----End Here----------------------------
-----Start Here-----(2)
1: 3
2: 3
3: 3
4: 3
5: 3
-----End Here----------------------------