导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→[讨论]quatrus 软件的奇怪波形

* 105824: [讨论]quatrus 软件的奇怪波形

   vfdff 
vfdff发表的帖子 

 [讨论]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

  
回复该帖

本主题共有 1 帖,分页:>>>>>该主题的所有内容[1]条

 *树形目录 只列出部分跟帖的标题以及简单的摘要信息 该主题的部分跟帖如下:

[上一篇帖子]:求助!!!!!!!!!!!!!!!!真的非常急本人要完成89S52控制8019实现tcp/ip的这个
[下一篇帖子]:红外发射与接收大家好!我做了一个红外自动控制的流水装置。用微调控制发射信号时。发射信号很不稳定。调测