2023-01-11 10:13:09 +00:00
|
|
|
/**
|
|
|
|
* 8-way Or:
|
|
|
|
* out = (in[0] or in[1] or ... or in[7])
|
|
|
|
*/
|
|
|
|
|
|
|
|
`default_nettype none
|
|
|
|
module Or8Way(
|
2024-10-17 18:36:58 +00:00
|
|
|
input [7:0] in,
|
|
|
|
output out
|
2023-01-11 10:13:09 +00:00
|
|
|
);
|
|
|
|
|
2024-10-17 18:36:58 +00:00
|
|
|
// Put your code here:
|
|
|
|
wire outA;
|
|
|
|
wire outB;
|
|
|
|
wire outC;
|
|
|
|
wire outD;
|
|
|
|
wire outE;
|
|
|
|
wire outF;
|
|
|
|
|
|
|
|
Or OR0(in[0], in[1], outA);
|
|
|
|
Or OR2(in[2], outA, outB);
|
|
|
|
Or OR3(in[3], outB, outC);
|
|
|
|
Or OR4(in[4], outC, outD);
|
|
|
|
Or OR5(in[5], outD, outE);
|
|
|
|
Or OR6(in[6], outE, outF);
|
|
|
|
Or OR7(in[7], outF, out);
|
2023-01-11 10:13:09 +00:00
|
|
|
|
|
|
|
endmodule
|