PROCESS(pulse_temp,pulse,clk,dat,key)
BEGIN
IF(clk'event and clk='1') THEN
IF(pulse_temp='1' AND pulse='0') THEN
flag='1';
END IF;
case key IS
when "000" => IF(flag='1') THEN
temp2<=dat;
flag2='1';
END IF;
IF(flag2='1') THEN
sgnout1<='1';
IF(cnt=temp2) THEN
sgnout1<='0';
cnt="0000000000" ;
flag2<='0';
flag<='0';
ELSE
cnt<=cnt+'1';
END IF;
END IF;
|