题解 | #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  out
);
	reg [7:0] rr;
	//alway中的必须为reg
	always@(*)
	begin
		rr = sel;
	end
	assign out = in[rr];

endmodule
//注意是以此类推,这是道对位输出的题

全部评论

相关推荐

牛客83265014...:完了,连现在都没开始面,13号投的是不是晚了
秋招的第一个offer,...
点赞 评论 收藏
分享
10-17 13:54
上海大学 运营
雾凇岛:这还说什么了,冲了兄弟们
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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