FiveChooseOne.v

module FiveChooseOne(x,y,w,u,v,m,s0,s1,s2);
	input [2:0] x,y,w,u,v;
	input s0,s1,s2;
	output reg [2:0] m;
	always @(*)
		begin
			case({s2,s1,s0})
				3'b000: m=u;
				3'b001: m=v;
				3'b010: m=w;
				3'b011: m=x;
				3'b100: m=y;
				3'b101: m=y;
				3'b110: m=y;
				3'b111: m=y;
		endcase
	end
endmodule

pins.txt

to,location

s2,PIN_V2
s1,PIN_V1
s0,PIN_U4

m[2],PIN_W19
m[1],PIN_AF22
m[0],PIN_AE22

u[2],PIN_U3
u[1],PIN_T7
u[0],PIN_P2
v[2],PIN_P1
v[1],PIN_N1
v[0],PIN_A13	
w[2],PIN_B13
w[1],PIN_C13
w[0],PIN_AC13
x[2],PIN_AD13
x[1],PIN_AF14
x[0],PIN_AE14
y[2],PIN_P25
y[1],PIN_N26
y[0],PIN_N25

实操视频:

Quartus 13.01 导出RTL Viewer 2023-03-20 19-51-17

08-18 01:47