题解 | #256选1选择器#

256选1选择器

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

`timescale 1ns/1ns

module top_module (
	input [255:0] in,
	input [7:0] sel,
	output  wire out
);
// integer i;
// always @(*)
// begin 
// 	for (i=0;i<=255;i=i+1)
// 	begin
// 		case(sel)
// 		i:out=in[i];
// 		endcase
//     end
// end

assign out = in[sel];


endmodule

全部评论

相关推荐

水墨不写bug:疑似没有上过大学
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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