matrixofdynamism
Advanced Member level 2
Here is the test case, a shared variable x_i drives and output port o_x.
When the simulation is run, x_i changes as we expect. However, o_x stays in 'X' state.
Why doesn't x_i get assigned to o_x in this case? It would be great if Jim Lewis could answer this one.
Code:
library ieee;
use ieee.std_logic_1164.all;
entity test_2 is
port (
o_x : out std_logic
);
end entity;
architecture beh of test_2 is
shared variable x_i : std_logic;
begin
process
begin
x_i := '1';
wait for 10 ns;
x_i := '0';
wait for 10 ns;
x_i := '1';
wait;
end process;
o_x <= x_i;
end architecture;
When the simulation is run, x_i changes as we expect. However, o_x stays in 'X' state.
Why doesn't x_i get assigned to o_x in this case? It would be great if Jim Lewis could answer this one.