O
omara007
Guest
Bok ljudi
Ja sam trenutno imaju sljedeće MUX Verilog broj:
Code:input [29:0] port0;
input [29:0] port1;
input [29:0] port2;
input [29:0] port3;
input [29:0] port4;
input [29:0] port5;
input [29:0] port6;
input [29:0] port7;reg [7:0] sel;reg [29:0] mux8to1; / / multipleksor 8-1Uvijek @ (in0 ili in1 ili in2 ili in3 ili in4 ili in5 ili in6 ili in7 ili sel)
casex (sel)
8'bxxxxxxx1: mux8to1 = port0; / / port0 odabrane
8'bxxxxxx10: mux8to1 = port1; / / port1 odabrane
8'bxxxxx100: mux8to1 = port2; / / port2 odabrane
8'bxxxx1000: mux8to1 = port3; / / port3 odabrane
8'bxxx10000: mux8to1 = port4; / / port4 odabrane
8'bxx100000: mux8to1 = port5; / / port5 odabrane
8'bx1000000: mux8to1 = port6; / / port6 odabrane
8'b10000000: mux8to1 = port7; / / port7 odabrane
Zadano: uumux32to1sp = 0;
endcase
Ja sam trenutno imaju sljedeće MUX Verilog broj:
Code:input [29:0] port0;
input [29:0] port1;
input [29:0] port2;
input [29:0] port3;
input [29:0] port4;
input [29:0] port5;
input [29:0] port6;
input [29:0] port7;reg [7:0] sel;reg [29:0] mux8to1; / / multipleksor 8-1Uvijek @ (in0 ili in1 ili in2 ili in3 ili in4 ili in5 ili in6 ili in7 ili sel)
casex (sel)
8'bxxxxxxx1: mux8to1 = port0; / / port0 odabrane
8'bxxxxxx10: mux8to1 = port1; / / port1 odabrane
8'bxxxxx100: mux8to1 = port2; / / port2 odabrane
8'bxxxx1000: mux8to1 = port3; / / port3 odabrane
8'bxxx10000: mux8to1 = port4; / / port4 odabrane
8'bxx100000: mux8to1 = port5; / / port5 odabrane
8'bx1000000: mux8to1 = port6; / / port6 odabrane
8'b10000000: mux8to1 = port7; / / port7 odabrane
Zadano: uumux32to1sp = 0;
endcase