N
Neil
Guest
hi, all,
I want to know some feathures of signal, so i just write a test design file
as follow to check
how the signal assignment works. but it doesn't work as I think.
In my opinion, finally, bOut should be 22, and aOut should be 11, since
there is a delta delay for the assignment of signal.
but the simulation in QuartusII 7.2, the results are: aOut and bOut are both
11.
so what's wrong in my thought, can anyone explain it? thank you.
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity test is
port(
aOut : out integer range 0 to 100;
bOut : out integer range 0 to 100);
end entity test;
architecture behave of test is
signal a: integer range 0 to 100 := 11; -- assign the initial values
signal b : integer range 0 to 100 := 22;
begin
process(a, b) -- the current value of a is 11 as default, and the b is
22 as default
begin
a <= b; -- assign the current value of b to a, but not really
assigned yet
b <= a; -- assign the current value of a to b, but not really
assigned yet
aOut <= a; -- assign the current value of a to aOut, but not really
assigned yet
bOut <= b; -- assign the current value of b to bOut, but not really
assigned yet
end process; -- and now, all assignments take effect, and the value
of a is 22, the value b is 11
-- and with next process execution, the value of aOut
and bOut is 22 and 11 for each
end architecture behave;
but the simulation in QuartusII 7.2, the results are: aOut and bOut are both
11
Best Regards!
-- Neil
I want to know some feathures of signal, so i just write a test design file
as follow to check
how the signal assignment works. but it doesn't work as I think.
In my opinion, finally, bOut should be 22, and aOut should be 11, since
there is a delta delay for the assignment of signal.
but the simulation in QuartusII 7.2, the results are: aOut and bOut are both
11.
so what's wrong in my thought, can anyone explain it? thank you.
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity test is
port(
aOut : out integer range 0 to 100;
bOut : out integer range 0 to 100);
end entity test;
architecture behave of test is
signal a: integer range 0 to 100 := 11; -- assign the initial values
signal b : integer range 0 to 100 := 22;
begin
process(a, b) -- the current value of a is 11 as default, and the b is
22 as default
begin
a <= b; -- assign the current value of b to a, but not really
assigned yet
b <= a; -- assign the current value of a to b, but not really
assigned yet
aOut <= a; -- assign the current value of a to aOut, but not really
assigned yet
bOut <= b; -- assign the current value of b to bOut, but not really
assigned yet
end process; -- and now, all assignments take effect, and the value
of a is 22, the value b is 11
-- and with next process execution, the value of aOut
and bOut is 22 and 11 for each
end architecture behave;
but the simulation in QuartusII 7.2, the results are: aOut and bOut are both
11
Best Regards!
-- Neil