MACHINE DE REMPLISSAGE ET DE BOUCHONNAGE ET MISE EN LOT             




  Acceuil            JAVA               VHDL             Les Diagrammes


2009/2010. 4éme Année                         Encadrant EMSI. 
                                                                                    Mr: Ramdani.
Ingénieurie Automatismes
et Informatique Industrielle.

Programme électronique (VHDL).



Capteur:
entity azert is port(
en,h :in bit;
so: out bit);
end azert;
architecture a_azert of azert is
signal x:bit;
begin
process(h)
begin
if(h'event and h='1') then
if(en='1') then x<='1';
elsif (en='0')then x<='0';
end if;
end if;
end process;
so<=x;
end a_azert;

Compteur 15
library ieee;
use ieee.numeric_bit.all;
use ieee.std_logic_1164.all;
entity cpt is port(
h,en:in bit;
rc0:out bit;
o:out unsigned(3 downto 0));
end cpt;
architecture a_cpt of cpt is
signal s:unsigned (3 downto 0);
begin
process(h)
begin
if(h'event and h='1')then
 if(en='1')then s<=s+1;
end if
end if;
end process;
o<=s;
rc0<='1' when s=15 else '0';
end a_cpt;
 
;