本专栏的目的是分享可以通过HDLBits仿真的Verilog代码 以提供参考 各位可同时参考我的代码和官方题解代码 或许会有所收益
题目链接:Vector5 - HDLBits
module top_module (
input a, b, c, d, e,
output [24:0] out );//
// The output is XNOR of two vectors created by
// concatenating and replicating the five inputs.
// assign out = ~{ ... } ^ { ... };
wire [24:0] s1, s2 ;
assign s1 = {{5{a}}, {5{b}}, {5{c}}, {5{d}}, {5{e}}} ;
assign s2 = {5{a, b, c, d, e}} ;
assign out = ~(s1 ^ s2) ;
endmodule