我需要在代码中实现以下字符串:
Q1 = (I1 & I2 & I3 | I3 & I4 & I5) & T2
Q - 输出值, 我 - 输入值, T2 - 计时器
我使用“after”完成它,但是我必须输出一个T2值,这意味着在“之后”之前它是0,在“之后”工作5秒后,我必须显示内部的变化时间图(T2应该等于1) 我怎么能这样做?
architecture logic_behavior of logic is
constant T1 : time := 2000 ms;
constant T2 : time := 5000 ms;
constant T3 : time := 7000 ms;
signal Q1_2: std_logic;
signal Q4_I1: std_logic;
signal Q4_I2: std_logic;
signal Q4_I3: std_logic;
signal TT2_I: std_logic := '0';
begin
Q1_2 <= (I1 and I2 and I3) or (I3 and I4 and I5) after T2;
Q1 <= Q1_2; --write direct output
Q2 <= (not Q1_2); --write inverse output
Q3 <= (not I1) or (not I2) or (not I3) or (not I4) after T3;
Q4_I1 <= I1 after T1;
Q4_I2 <= I2 after T2;
Q4_I3 <= I3 after T3;
Q4 <= Q4_I1 or Q4_I2 or Q4_I3;
end logic_behavior;