A
Amit
Guest
Hi group,
I'm working on project (basic) to learn VHDL and the purpose of
process (which had made so confused and mad). Anyway, I have question
and need to know how I can create a toggle flipflop using D f/f.
This is what that I think it should be but don't know how to get a
confirm so I will appreciate it if somebody could tell me if I'm on a
right track or no (the same as process);
What it must be is the output (q) which clocks another component and
qbar which goes back in d (input). Any comment?
LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY toggle IS
PORT(
d: IN STD_LOGIC;
rcClk: IN STD_LOGIC;
q: BUFFER STD_LOGIC;
qbar: OUT STD_LOGIC
);
END toggle ;
ARCHITECTURE beh OF toggle IS
BEGIN
PROCESS(rcClk)
BEGIN
IF (rcClk'EVENT AND rcClk = '1') THEN
q <= d;
END IF;
END PROCESS;
qbar <= NOT (q);
END beh;
I'm working on project (basic) to learn VHDL and the purpose of
process (which had made so confused and mad). Anyway, I have question
and need to know how I can create a toggle flipflop using D f/f.
This is what that I think it should be but don't know how to get a
confirm so I will appreciate it if somebody could tell me if I'm on a
right track or no (the same as process);
What it must be is the output (q) which clocks another component and
qbar which goes back in d (input). Any comment?
LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY toggle IS
PORT(
d: IN STD_LOGIC;
rcClk: IN STD_LOGIC;
q: BUFFER STD_LOGIC;
qbar: OUT STD_LOGIC
);
END toggle ;
ARCHITECTURE beh OF toggle IS
BEGIN
PROCESS(rcClk)
BEGIN
IF (rcClk'EVENT AND rcClk = '1') THEN
q <= d;
END IF;
END PROCESS;
qbar <= NOT (q);
END beh;