[讨论]quatrus 软件的奇怪波形
-- FPGA 设计及应用(第二版) page 102
-- 两进程结构体的结构
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
entity two_process is
port(
d : in std_logic;
q : out std_logic;
c1,c2 : out std_logic_vector(2 downto 0);
cc1,cc2 : out std_logic_vector(2 downto 0);
ccc1,ccc2 : out std_logic_vector(2 downto 0)
);
end two_process;
------------------------------
architecture structural of two_process is
signal a: std_logic := '0'; -- a,b 初始状态必须为 0,否则进不了两个进程
signal b: std_logic := '0';
signal count1,count2,count3 : std_logic_vector(2 downto 0) := "000";
begin
p1:process(d,b)
variable d1,d2 : integer range 0 to 7 := 0;
begin
if(b='1') then
q <= d;
-- qq <= TO_STD_LOGIC(q'transaction);
-- Error (10482): VHDL error at two_process 23_55.vhd(30): object "TO_STD_LOGIC" is used but not declared
count1 <= count1 + "1";
c1 <= count1 ;
d1 := d1+1;
c2 <= conv_std_logic_vector(d1,3);
elsif (d'event and d='1') then
a <= d;
count2 <= count2 + "1";
cc1 <= count2 ;
d2 := d2+1;
cc2 <= conv_std_logic_vector(d2,3);
end if;
end process p1;
p2:process(a)
variable d3 : integer range 0 to 7 := 0;
begin
if(a'event and a='1') then
b <= a;
count3 <= count3 + "1";
ccc1 <= count3 ;
d3 := d3+1;
ccc2 <= conv_std_logic_vector(d3,3);
end if;
end process p2;
end structural;
这个程序,我用 quatrus 软件仿真后的奇怪波形:
这里我定义了这么多个 变量观察
但是发现 q正常的随 d 变化
可是波形中没有一个变量是会持续变化的
好象说有的进程不运行一样 !!
发表时间:2007年5月13日19:09:45