48 lines
615 B
Plaintext
48 lines
615 B
Plaintext
module network_hier_test (clk,
|
|
in1,
|
|
in2,
|
|
in3,
|
|
out1,
|
|
out2);
|
|
input clk;
|
|
input in1;
|
|
input in2;
|
|
input in3;
|
|
output out1;
|
|
output out2;
|
|
|
|
wire w1;
|
|
wire w2;
|
|
wire w3;
|
|
wire w4;
|
|
wire w5;
|
|
|
|
BUF_X1 buf_in (.A(in1),
|
|
.Z(w1));
|
|
BUF_X2 buf_out1 (.A(w5),
|
|
.Z(out1));
|
|
BUF_X1 buf_out2 (.A(w3),
|
|
.Z(out2));
|
|
DFF_X1 reg1 (.D(w4),
|
|
.CK(clk),
|
|
.Q(w5));
|
|
sub_block sub1 (.A(w1),
|
|
.B(in2),
|
|
.Y(w2));
|
|
sub_block sub2 (.A(w2),
|
|
.B(in3),
|
|
.Y(w3));
|
|
endmodule
|
|
module sub_block (A,
|
|
B,
|
|
Y);
|
|
input A;
|
|
input B;
|
|
output Y;
|
|
|
|
wire n1;
|
|
|
|
BUF_X1 buf_gate (.A(n1),
|
|
.Z(Y));
|
|
endmodule
|