Z
Zhane
Guest
Code:signaal: std_logic_vector (3 Downto 0);
signaal LED: std_logic_vector;
signaal count: integer: = 0;proces (CLK)
beginnenif (clk'event = true en clk = '1 ') then
state <= nextState;
end if;
einde procesproces (staat, RST, in1, in2, in3)
beginnen
LED <= '0 ';
geval staat
wanneer staat 1 =>
vermogen van <= "0010";
if (in1 = '1 ') then
count <= count 10;
elsif (in2 = '1 ') then
count <= count 5;
elsif (in3 = '1 ') then
count <= count 20;
end if;if (count> 90) dan
LED <= '1 ';
count <= 0;
end if;
wanneer toestand 2 =>
vermogen van <= "0001";
einde geval;end if;
signaal LED: std_logic_vector;
signaal count: integer: = 0;proces (CLK)
beginnenif (clk'event = true en clk = '1 ') then
state <= nextState;
end if;
einde procesproces (staat, RST, in1, in2, in3)
beginnen
LED <= '0 ';
geval staat
wanneer staat 1 =>
vermogen van <= "0010";
if (in1 = '1 ') then
count <= count 10;
elsif (in2 = '1 ') then
count <= count 5;
elsif (in3 = '1 ') then
count <= count 20;
end if;if (count> 90) dan
LED <= '1 ';
count <= 0;
end if;
wanneer toestand 2 =>
vermogen van <= "0001";
einde geval;end if;