J
Jan
Guest
Please review the snipped below.
I would expect the following scenario :
1. process p1 gets executed first. dummy is set to '0'. Then the
process is suspended until v_p1_enable is '1'
2. process p2 gets executed. After a suspension of 1us, it sets
v_p1_enable to '1'
3. process p1 comes out of suspension and resumes it tasks, setting
dummy to '1'
But simulation shows me that this is not the case... why not ?
architecture RTL of test is
shared variable v_p1_enable : std_logic := '0';
begin
p1:
process
variable dummy : std_logic;
begin
dummy := '0';
wait until v_p1_enable = '1';
dummy := '1';
end process;
p2:
process
begin
wait for 1 us;
v_p1_enable := '1';
end process;
end RTL;
I would expect the following scenario :
1. process p1 gets executed first. dummy is set to '0'. Then the
process is suspended until v_p1_enable is '1'
2. process p2 gets executed. After a suspension of 1us, it sets
v_p1_enable to '1'
3. process p1 comes out of suspension and resumes it tasks, setting
dummy to '1'
But simulation shows me that this is not the case... why not ?
architecture RTL of test is
shared variable v_p1_enable : std_logic := '0';
begin
p1:
process
variable dummy : std_logic;
begin
dummy := '0';
wait until v_p1_enable = '1';
dummy := '1';
end process;
p2:
process
begin
wait for 1 us;
v_p1_enable := '1';
end process;
end RTL;