Comparateur 1bit Structurelle
Comparateur 1bit Structurelle
use ieee.std_logic_1164.all;
entity cmp1bit is
end cmp1bit;
component non is
end component;
component et is
end component;
component nxou is
end component;
begin
end archcmp1bit;
Comparateur comportemental
library ieee;
use ieee.std_logic_1164.all;
entity Comparateurcmp is
begin
P1:Process(A,B)
Begin
else
else
else
end if;
end if;
end if;
end process;
end ArchComparateurcmp;
Comparateur Float
library ieee;
use ieee.std_logic_1164.all;
entity Comparateurflot is
end Comparateurflot;
begin
E<= A xnor B;
end ArchComparateurflot;
Demi add float
library ieee;
use ieee.std_logic_1164.all;
entity demi_add is
end demi_add;
begin
c<=a and b;
s<= a xor b;
end arch_demi_add;
use ieee.std_logic_1164.all;
entity demi_addcomp is
end demi_addcomp;
begin
process(a,b)
begin
vect:=a&b;
if(vect="11")then s<='0';c<='1';
else s<='1';c<='0';
end if;
end process;
end arch_demi_addcomp;
entity demiadd is
end demiadd;
component et is
end component;
component xou is
end component;
begin
end archdemiadd;
use ieee.std_logic_1164.all;
entity full_addflot is
end full_addflot;
begin
end arch_full_addflot;
use ieee.std_logic_1164.all;
entity full_addflot is
port (a,b,cin:in std_logic; c,s:out std_logic);
end full_addflot;
begin
end arch_full_addflot;
Compteur
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity Compteur is
end Compteur;
begin
p1:process(clk,c)
begin
c<=c+1;
end if;
Q<=a;
end process;
end ArchCompteur;