Board logo

标题: 关于触发器问题 [打印本页]

作者: icefog    时间: 2006-2-27 15:24     标题: 关于触发器问题

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;


ENTITY cpld IS
   PORT (
  stbin : in std_logic;
  datain : in std_logic_vector(7 downto 0);
  line   : out std_logic_vector(3 downto 0));
END cpld;


ARCHITECTURE arch OF cpld IS
BEGIN
 process(stbin)
 begin
  if stbin 'event and stbin='1' then
   line(0)<=datain(0);
   line(1)<=datain(1);
   line(2)<=datain(2);
   line(3)<=datain(3);
  end if; 
 end process;
END arch;


上面的代码中if stbin 'event and stbin='1' then仿真成功,但下载到FPGA中却从不满足条件,


改为if stbin 'event and stbin='0' then也从不满足条件


改为if stbin='1' then也从不满足条件


改为if stbin='0' then也从不满足条件


这是为什么呢?

请问对于stbin这个接口有没有规定在哪些接口才能实现?

[此贴子已经被作者于2006-2-27 15:24:06编辑过]


作者: waterlily    时间: 2006-2-27 16:40

那你看看从stbin来的信号的电平类型和所用器件输入stbin管脚的电平标准是不是匹配,
作者: icefog    时间: 2006-2-28 10:32

不好意思原来是我搞错了引脚。




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0