Simulate a D-Flip Flop on Xilinx using Verilog HDL | Behavioral Modelling
Simulate a D-Flip Flop on Xilinx using Verilog HDL | Behavioral Modelling:
module dp(d,db,pr,clr,clk,q,qb);
input d;
input db;
input pr;
input clr;
input clk;
output q;
output qb;
wire w1,w2,w3,w4,w5,w6;
assign db=~(d);
assign w1=~(d&qb&(~clk));
assign w2=~(db&q&(~clk));
assign w3=~(w1&pr&w4);
assign w4=~(w2&clr&w3);
assign w5=~(w3&clk);
assign w6=~(w4& clk);
assign q=~(w5&qb);
assign qb=~(w6&q);
endmodule
Let me know if you have any doubts or if you need anything to change. If you are satisfied with the solution, please leave a +ve feedback : ) Let me know for any help with any other questions. Thank You! ===========================================================================
Get Answers For Free
Most questions answered within 1 hours.