用的是quartus2仿真
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_unsigned.ALL;
ENTITY study_try IS
PORT
(
clk: INSTD_LOGIC;
outpututstd_logic_vector(3 downto 0)
);
END study_try;
ARCHITECTURE progress OF study_try IS
signal outs:std_logic_vector(3 downto 0);
BEGIN
process(clk)
begin
if(clk'event and clk='1') then
output<=outs;--注意这
outs<=outs+1;--
end if;
end process;
end progress;
上面这个程序和下面这个程序有什么不同呢?
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_unsigned.ALL;
ENTITY study_try IS
PORT
(
clk: INSTD_LOGIC;
outpututstd_logic_vector(3 downto 0)
);
END study_try;
ARCHITECTURE progress OF study_try IS
signal outs:std_logic_vector(3 downto 0);
BEGIN
process(clk)
begin
if(clk'event and clk='1') then
outs<=outs+1;
output<=outs;--注意这
end if;
end process;
end progress;
不知道为什么这2个程序仿真以后的仿真结果是一样的,
而且为什么output的仿真结果的第一个数据都是0001,还有
就是如果在定义outs时用signal outs:std_logic_vector(3 downto 0):="0101";
赋值怎么没有用,output的仿真波形一点也没变,
那位高手帮帮忙啊!