module paral1(q,a,clk);
output q,a;
input clk;
reg q,a;
initial q<=0;
always @(posedge clk)
begin
q=~q;
end
always @(posedge clk)
begin
a=~q;
end
endmodule
`timescale 1ns / 1ns
module paral_tst(
);
wire q,a;
reg clk;
paral1 u1(.q(q),.a(a),.clk(clk));
initial clk<=1'b0;
always #10 clk<=~clk;
endmodule
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/33a51a236f1a599e86578cc5b3853fc1.png)
module paral2(
q,a,clk
);
output q,a;
input clk;
reg q,a;
initial q<=0;
always @(posedge clk)
begin
a=~q;
end
always @(posedge clk)
begin
q=~q;
end
endmodule
`timescale 1ns / 1ns
//
// Company:
// Engineer:
//
// Create Date: 2020/02/24 12:04:54
// Design Name:
// Module Name: tst
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//
module tst(
);
wire a,q;
reg clk;
paral2 u1 (.clk(clk),.a(a),.q(q));
initial begin
clk<=1'b0;
end
always #10 clk<=~clk;
endmodule
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/73612ae59f1471e019712159b55d0986.png)