首页 > 试题广场 >

下列的Verilog代码实现的电路功能是()? module

[单选题]
下列的Verilog代码实现的电路功能是()?
module test(
		input wire[2:0] a,
		output reg[7:0] y
);
		integer i;
		always @(*) begin 
			for (i=0;i<8;i=i+1) begin
				if (a==i)
				    y[i]<=1;
				else 
                                    y[i]<=0;
			end
		end
endmodule


  • 模8计数器
  • 8-3优先编码器
  • 数据选择器
  • 3-8译码器
3-8译码器:利用三位的二进制数对应8个8进制数。  https://its401.com/article/quanqueen/113094663
模8计数器:实现八个状态转化:https://max.book118.com/html/2019/0809/8027136060002041.shtm

发表于 2022-03-16 21:01:31 回复(1)