I am new in this field, I don't know if they've been asked before. I'm writing code by creating separate modules to get used to big projects. I have no problems creating modules, but I don't know how to create a testbench.So I should write test bench according to main module. but the main module was created with reference to 3 separate modules. How should be testbench of the following code? Can you help me with this code?
//location of the main program
module circuit1_main(A,sel_m,Q);
input [2:0]A;
input sel_m;
output Q;
wire clk_m,reset_m,ud_m,load_m;
wire [2:0]A;
wire sel_m;
wire Q;
wire internal1;
wire internal2;
wire internal3;
wire internal4;
circuit1_counter cnt1(.clk(clk_m),.reset(reset_m),
.en(1'b1),.ud(ud_m),.load(load_m),
.d(A),.cnt(internal1));
assign internal2 = ~internal1;
circuit1_mux mux1(.a(internal1),.b(internal2),
.sel(sel_m),.out(internal3));
circuit1_shiftreg shiftreg1(.clk(clk_m),.reset(reset_m),
.sin(internal3),.sout(internal4));
assign Q = internal4;
endmodule