R
RishiD
Guest
Hi,
Just started learning VHDL, and trying to code up a S-R Flip flop with
async reset.
Here is what I got, believe this is correct.
Any thing I am missing?
Thanks,
RishiD
achitecture SR of SRFF is
signal Qint : STD_LOGIC;
begin
process (clk, reset) begin
if (reset = '1' and s = '1') then
Qint <= 'X';
elsif (reset = '1' and s = '0') then
Qint <= '0';
elsif (clk'event AND clk = '1') then
if (s = '1') then
Qint <= '1';
end if;
end if;
end process;
Q <= Qint;
end SR;
Just started learning VHDL, and trying to code up a S-R Flip flop with
async reset.
Here is what I got, believe this is correct.
Any thing I am missing?
Thanks,
RishiD
achitecture SR of SRFF is
signal Qint : STD_LOGIC;
begin
process (clk, reset) begin
if (reset = '1' and s = '1') then
Qint <= 'X';
elsif (reset = '1' and s = '0') then
Qint <= '0';
elsif (clk'event AND clk = '1') then
if (s = '1') then
Qint <= '1';
end if;
end if;
end process;
Q <= Qint;
end SR;