I have created a module for DFlipFlop in DFF
module and instantiated 4 of them in seqgen
module. I am not able to generate results. Can you please help me where I am going wrong?
module DFF(input d, input rstn, input clk, output reg q);
always @(posedge clk or negedge rstn)
if(!rstn)
q <= 0;
else
q <= d;
endmodule
module seqgen();
wire q1=1'b1,q2=1'b1,q3=1'b1,q4=1'b0;
wire da=1'b1;
reg clk = 1'b0,rstn = 1;
always #10 clk = ~clk;
assign da = ~q1|~q2|~q4;
DFF dffa(da,rstn,clk,q1);
DFF dffb(q1,rstn,clk,q2);
DFF dffc(q2,rstn,clk,q3);
DFF dffd(q3,rstn,clk,q4);
endmodule