Professional Documents
Culture Documents
entity andg is
port(a,b:in bit; c: out bit);
end andg;
-- entity declaration
-- declaration of input output port
-- end of entity
architecture a1 of andg is
begin
c<= a and b;
end a1;
-- architecture declaration
-- architecture body
entity org is
port(i,e:in bit; f: out bit);
end org;
-- entity declaration
-- declaration of input output port
-- end of entity
architecture a2 of org is
begin
f<= i or e;
end a2;
-- architecture declaration
-- architecture body
entity notg is
port(g:in bit;h:out bit);
end notg;
-- entity declaration
-- declaration of input output port
-- end of entity
architecture a3 of notg is
begin
h<=not g;
end a3;
-- architecture declaration
-- architecture body
-- end of architecture
entity dff is
port(d1,clk1:in bit; q1:out bit);
end dff;
-- entity declaration
-- declaration of input output port
-- end of entity
-- architecture declaration
-- architecture body
entity main is
port(SL,clk:in bit;d: in bit_vector(0 to 3);
-- end of architecture
-- end of architecture
-- end of architecture
-- entity declaration
-- declaration of input output port
-- end of entity
architecture a5 of main is
component andg is
port(a,b:in bit; c: out bit);
end component;
-- architecture declaration
-- component declaration
component org is
port(i,e:in bit; f: out bit);
end component;
-- component declaration
component notg is
port(g:in bit;h:out bit);
end component ;
-- component declaration
component dff is
port(d1,clk1:in bit; q1:out bit);
end component ;
-- component declaration
-- end of architecture
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity PISO is
PORT(X : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
CLOCK,RESET : IN STD_LOGIC;
Z : OUT STD_LOGIC);
end PISO;
I := 0;