Documente Academic
Documente Profesional
Documente Cultură
JK FLIPFLOP
NULL ;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
--use IEEE.NUMERIC_STD.ALL;
--library UNISIM;
end if;
--use UNISIM.VComponents.all;
end if;
entity JKFlip is
port (
clock
end process;
: in std_logic;
end Behavioral;
: in std_logic;
: in std_logic;
Q,Qn
: out std_logic;
rest
: in std_logic);
D.FLIP FLOP
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
end JKFlip;
entity Flip is
architecture Behavioral of JKFlip is
signal qtemp, qbartemp : std_logic :='0';
Port
clc
: in std_logic;
begin
rest
Q
<= qtemp;
Qn
<= qbartemp;
process (clock,rest)
: in std_logic;
: in std_logic;
: out
std_logic);
begin
if ( rest ='1' ) then
end Flip;
begin
--Outputs
signal Z : std_logic;
-- No clocks detected in port list. Replace <clock>
below with
end if;
-- appropriate port name
end process;
end Behavioral;
constant <clock>_period : time := 10 ns;
RANGKAIN KOMBISIONAL
LIBRARY ieee;
BEGIN
USE ieee.std_logic_1164.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--USE ieee.numeric_std.ALL;
ENTITY alrmtmperatursuhu_tb IS
END alrmtmperatursuhu_tb;
KL => KL,
PA => PA,
Z => Z
COMPONENT alarmtemperatursuhu
);
PORT(
oven : IN std_logic;
tungku : IN std_logic;
KL : IN std_logic;
PA : IN std_logic;
Z : OUT std_logic
);
END COMPONENT;
--Inputs
end process;
-- Stimulus process
stim_proc: process
begin
process (clk,enter)
wait;
begin
end process;
END;
end if;
Sistem hirarki
end process;
library IEEE;
process(clk,mode)
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
begin
if (clk'event and clk='1')then
B<= B(1 downto 0) & mode; --shift left
end if;
end process;
enter_db <= not(A(2)) and A(1) and A(0);
mode_db <= not(B(2)) and B(1) and B(0);
end Behavioral;
T FLIPPLOP
--library UNISIM;
ARCHITECTURE behavioral OF
pintumobilcoy_pintumobilcoy_sch_tb IS
--use UNISIM.VComponents.all;
COMPONENT pintumobilcoy
PORT( XLXN_8
IN
STD_LOGIC;
IN
STD_LOGIC;
OUT
STD_LOGIC);
SIGNAL XLXN_8
STD_LOGIC;
SIGNAL XLXN_9
STD_LOGIC;
SIGNAL XLXN_10
STD_LOGIC;
entity TFlip is
XLXN_9
XLXN_10 :
Port
( t
in std_logic;
clc:
in std_logic;
END COMPONENT;
q
qn
:
:
out std_logic;
out std_logic);
end TFlip;
BEGIN
architecture Behavioral of TFlip is
UUT: pintumobilcoy PORT MAP(
begin
begin
);
if clc = '1' then
tb : PROCESS
qn <= t;
BEGIN
end if;
end process;
end Behavioral;
pintu mobil
END;
LIBRARY ieee;
SEVEN SEGMENT
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;
LIBRARY UNISIM;
USE UNISIM.Vcomponents.ALL;
ENTITY pintumobilcoy_pintumobilcoy_sch_tb IS
END pintumobilcoy_pintumobilcoy_sch_tb;
--library UNISIM;
--use UNISIM.VComponents.all;
"0101111"
when MSB="0000" else --B
"1100101"
"0011111"
"0011111"
"1101100";
--F
entity sevsegmen is
Port ( hasil : in STD_LOGIC_VECTOR (7 downto 0);
ledone,ledtwo : out STD_LOGIC_VECTOR (6
downto 0));
"1101111"
"1010010"
"1111111"
"1111011"
"1111110"
end sevsegmen;
architecture Behavioral of sevsegmen is
end Behavioral;
signal LSB, MSB : std_logic_vector(3 downto 0);
begin
LSB <= hasil(3 downto 0);
DEBOUNCING
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
--USE ieee.numeric_std.ALL;
--F
ENTITY debouncing_tb IS
END debouncing_tb;
ARCHITECTURE behavior OF debouncing_tb IS
-- Component Declaration for the Unit Under Test
(UUT)
COMPONENT debouncing
PORT(
clk : IN std_logic;
enter : IN std_logic;
mode : IN std_logic;
enter_db : OUT std_logic;
mode_db : OUT std_logic
);
END COMPONENT;
"1011101"
"1011011"
"0111010"
"1101011"
--Inputs
signal clk : std_logic := '0';
signal enter : std_logic := '0';
end process;
END;
TFLIP-FLOP
--library UNISIM;
--use UNISIM.VComponents.all;
entity TFlip is
Port
( t
clc:
in std_logic;
:out std_logic;
clk_process :process
qn
:out std_logic);
);
in std_logic;
begin
clk <= '0';
end TFlip;
begin
Process (clc,t)
begin
end process;
-- Stimulus process
stim_proc: process
qn <= t;
begin
end if;
end process;
end Behavioral;