题解 | #多位信号xnor#

多位信号xnor

https://www.nowcoder.com/practice/aa21227e7bf6409e818b01ea21a44c2b

`timescale 1ns/1ns

module top_module(
    input a, b, c, d, e,
	output [24:0] out
);
wire [24:0] out1,out2;
reg [24:0] out_flag;
assign out1={{5{a}},{5{b}},{5{c}},{5{d}},{5{e}}};
assign out2={5{a,b,c,d,e}};
integer i;
always@(out1,out2)
begin
    for(i=0;i<=24;i=i+1)
    begin
    out_flag[i]=~(out1[i]^out2[i]);
    end
end
assign out=out_flag;
endmodule

#23届找工作求助阵地#
全部评论

相关推荐

缒梦&独舞:这家公司是这样的,去年给我实习offer了,不过也是面着玩儿的,他周六还要去做公益志愿活动
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务