如何在带有信号vhdl

时间:2018-12-29 12:21:43

标签: function time vhdl

我想在函数中使用after,因为我不希望立即更改信号Puerta_A1,而是要一段时间后更改。我的功能是这样的:

function fotocelula(FOT_A,FC_cerradoA,FC_abiertoA,AL_A,AP_A: in std_logic) 
return std_logic_vector is  
variable salida: std_logic_vector;
begin
    IF FOT_A='1' THEN 
      report "hola1";
        if FC_cerradoA='1' THEN
            return "11";
        end if;
        if FC_abiertoA='1' THEN
            return "00";
        end if;
        if AL_A='1' then
            return "11";
        end if;
        if AP_A='1' then
            return "01";
        end if; 
        salida:="10" after 200 ns;
        return salida;
    end if;
    IF FOT_A='0' THEN 
      report "hola2";
        if FC_abiertoA='1' THEN
            return "00";
        end if;
        if AL_A='1' then
            return "11";
        end if;
        if AP_A='1' then
            return "01";
        end if;
        return "01";
    else return "10";
    end if;
end fotocelula;

谢谢

0 个答案:

没有答案