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 = ~{ ... } ^ { ... };
assign out = {{~{5{a}}^{a,b,c,d,e}},{~{5{b}}^{a,b,c,d,e}},
{~{5{c}}^{a,b,c,d,e}},{~{5{d}}^{a,b,c,d,e}},{~{5{e}}^{a,b,c,d,e}}};
endmodule
//注意波浪线和花括号位置,~{5{c}}是可以的,{~5{c}}是不可以的
HDLbits刷题笔记
于 2023-12-27 10:35:55 首次发布