14. architecture Behavioral of LED is
begin
process(sw01)
begin
if (sw01 = '1') then
led <='1';
else
led <='0';
end if;
end process;
end Behavioral;
Create or replace Procedure sample as
sw number;
begin
sw := 1;
if (sw = 1) then
sw := 0;
else
sw := 1;
end if;
End;
/
何となく似ている!!
23. ようは入力に対する出力が合えばいいよね?
process(A,B) begin
c<=‘0’; S<='0';
if (A='0' and B='0') then
C <=‘0’; S <='0';
end if;
if (A='0' and B='1') then
C <='0'; S <='1';
end if;
if (A='1' and B='0') then
C <='0'; S <='1';
end if;
if (A='1' and B='1') then
C <='1'; S <='0';
end if;
end process;
A B C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0