Initialisieren von Tastatur zu einlesen von Zahlen
Hall ich habe problem mit dem Tastatur teil und Einleseteil von Zahlen
Das Tastatur Teil lauft richtig-
Das Problem ist die eingegebene Zahlen von der anderen Teil nicht erkannt
Wie kann ich es erledigen,damit die eingegben Zahlen von der anderen teil erkennen müssen. Tastatur teil sende ich
Bitte Hilfe
------------------------------------------------------
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity n1_zero_sreg is
port (
Clkin: in STD_LOGIC;
Rest: in STD_LOGIC;
Enable: in STD_LOGIC;
Pout: buffer STD_LOGIC_VECTor (2 downto 0);
Row: in STD_LOGIC_VECTor (3 downto 0);
Taste: buffer STD_LOGIC_VECTor (3 downto 0);
Enter: out STD_LOGIC;
freigabe: out STD_LOGIC;
Clear: out STD_LOGIC
);
end n1_zero_sreg;
architecture n1_zero_sreg_arch of n1_zero_sreg is
begin
process(Clkin,Rest)
variable QB:std_logic;
variable V: natural range 0 to 3;
variable VTaste: STD_LOGIC_VECTor (3 downto 0);
begin
if Rest='1' then
Pout<=('0',others=>'1');
Taste<="1111";
V := 0;
QB:= '0';
elsif Clkin='1' and Clkin'event then
if Enable='1'then
QB:= Pout(0);
for K in 1 to 2 loop
Pout(k-1)<=Pout(k);
end loop;
Pout(2)<=QB;
case Pout is
when "110"=>
case Row is
when "0111" =>Taste<= "0011"; V:=0; --3
when "1011" => Taste <="0110"; V:=0; --6
when "1101" => Taste <="1001"; V:=0; --9
when "1110" => Taste <="1011"; V:=0; --# 11
when others => V := V+1;
end case;
when "101" =>
case Row is
when "0111"=>Taste<="0010"; V:=0; --2
when "1011"=>Taste<="0101"; V:=0; --5
when "1101"=>Taste<="1000"; V:=0; --8
when "1110"=>Taste<="0000"; V:=0; --0
when others => V := V+1;
end case;
when "011" =>
case Row is
when "0111"=>Taste<="0001"; V:=0; --1
when "1011"=>Taste<="0100"; V:=0; --4
when "1101"=>Taste<="0111"; V:=0; --7
when "1110"=>Taste<="1100"; V:=0; --* 12
when others => V :=V+1;
end case;
when others => Null;
end case;
if (V=3) then
Taste<="1111"; -- burayi degistirebilir miyim Taste<="0000"
V := 0;
end if;
-----------------------------------------------------------------------------------
VTaste:=Taste;
--if VTaste="1111" and( Taste="0000" | Taste="0001" | Taste="0010" | Taste="0011" | Taste="1000" | Taste="0101" | Taste="0110" | Taste="0111" | Taste="1000" | Taste="1001") then
if VTaste="1111" then
if Taste="0000" or Taste="0001" or Taste="0010"or Taste= "0011" or Taste="1000" or Taste="0101" or Taste="0110" or Taste="0111" or Taste="1000"or Taste="1001" then
freigabe <= '1';
else
freigabe<= '0';
end if;
end if;
----------------------------------------------------------------------
end if;
end if;
end process;
Clear <= '1' when Taste="1100" else '0';
Enter<= '1' when Taste="1011" else '0';
end n1_zero_sreg_arch;