Verilog・ベクトルのエックスノア (XNOR)

エックスノア (XNOR) の表示方法

~a ^ a;

エックスノア (XNOR) の真理値表

ABA XNOR B
001
010
100
111

module top_module (
	input a, b, c, d, e,
	output [24:0] out
);

	wire [24:0] top, bottom;
	assign top    = { {5{a}}, {5{b}}, {5{c}}, {5{d}}, {5{e}} };
	assign bottom = {5{a,b,c,d,e}};
	assign out = ~top ^ bottom;	// Bitwise XNOR

	// This could be done on one line:
	// assign out = ~{ {5{a}}, {5{b}}, {5{c}}, {5{d}}, {5{e}} } ^ {5{a,b,c,d,e}};
	
endmodule

参考

https://hdlbits.01xz.net/wiki/Vector5