For example if i am going to model T flip flop using D flip flop. I am not writing the whole code of T flip flop as here it is not related to my query.
module T_ff(q,clk,clear);
//...............
//Instantiate the D flip flop
D_ff dff(q,~q,clk,clear);
endmodule
// edge triggered D flip flop
module D_ff(q,qbar,d,clk,clear);
//..............
endmodule
The number of input/output ports are different in Instantiate of D flip flop (define inside the T flip flop) and in module of D flip flop. Is it fine? Can it result in error?