- Code(1)
signal d,clk,q,reset :std_logic;
process(clk,d)
begin
if (clk’event and clk=’1’) then
if reset = '1' then
q <= '0';
else
q <= d;
end if;
end if;
end process;
- Code (2)
signal d,clk,q,reset :std_logic;
process(clk,d)
begin
if (clk’event and clk=’1’) then
if reset = '1' then
q <= '1';
else
q <= d;
end if;
end if;
end process;
- Code (3)
signal d,clk,q,reset :std_logic;
process(clk,d)
begin
if (clk’event and clk=’1’) then
if reset = '0' then
q <= '0';
else
q <= d;
end if;
end if;
end process;
- Code (4)
signal d,clk,q,reset :std_logic;
process(clk,d)
begin
if (clk’event and clk=’1’) then
if reset = '0' then
q <= '1';
else
q <= d;
end if;
end if;
end process;
- Code (5)
signal d,clk,q,reset :std_logic;
process(clk,d)
begin
if reset = '1' then
q <= '0';
elsif (clk’event and clk=’1’) then
q <= d;
end if;
end process;
- Code (6)
signal d,clk,q,reset :std_logic;
process(clk,d)
begin
if reset = '1' then
q <='1';
elsif (clk’event and clk=’1’) then
q <= d;
end if;
end process;
- Code (7)
signal d,clk,q,reset :std_logic;
process(clk,d)
begin
if reset = '0' then
q <='0';
elsif (clk’event and clk=’1’) then
q <= d;
end if;
end process;
- Code (8)
signal d,clk,q,reset :std_logic;
process(clk,d)
begin
if reset = '0' then
q <= '1';
elsif (clk’event and clk=’1’) then
q <= d;
end if;
end process;
- Code 1
signal c,a,b,select,clk :std_logic;
process(clk,a,b,select)
begin
if (clk’event and clk=’1’) then
if select = '1' then
c <= a and b;
else
c <= a or b;
end if;
end if;
end process;
- Code 2
signal c,a,b,select,clk :std_logic;
process(clk,a,b,select)
begin
if (clk’event and clk=’1’) then
if select = '1' then
c <= a and b;
end if;
end if;
end process;
- Code 3
signal c,a,b,select :std_logic;
process(a,b,select)
begin
if select = '1' then
c <= a and b;
end if;
end process;
- Code 4
signal c,a,b,clk :std_logic;
process(clk,a,b)
begin
if (clk=’1’) then
c <= a and b;
end if;
end process;
- Code 5
signal c,a,b,clk :std_logic;
process(clk,a,b)
begin
c <= a or b;
if (clk=’1’) then
c <= a and b;
end if;
end process;
- Code 6
signal c,a,b,clk :std_logic;
process(clk,a,b)
begin
if (clk=’1’) then
c <= a and b;
else
c <= a or b;
end if;
end process;