library IEEE;
use IEEE.std_logic_1164.all;
en
tity TEST is
port(
CP0 : in std_logic;
D: in std_logic_vector (3 downto 0);
Q : out std_logic_vector (3 downto 0);
end TEST;
architecture ffd_arch of TEST is
signal TEMP_Q: std_logic_vector (3 downto 0);
begin
process (CP0)
begin
if (CP0'event and CP0='1')then
TEMP_Q <= D;
end if;
end process;
Q <= TEMP_Q;
end architecture;
IN1到IN3是24V的输入,经过电阻分压后做CPLD输入端
D0到D3信号在CP0的上升沿输出锁存到Q0到Q3
D0到D3置0
CP0置0
Q0至3信号按理应该保持不变
但是实际上
D0到D3信号在CP0为1时D0到有等于Q0到Q3
D0到D3置0
CP0置0
Q0到Q3信号也跟着置0了
-
苦恼死了...一星期都没想出办法
一周热门 更多>