Several methods for implementing the 4-to-1 data selector using OpenGL

Source: Internet
Author: User
Method 1
Module MUX (
D1,
D2,
D3,
D4,
SE1,
Se2,
Dout
);
Input D1;
Input D2;
Input D3;
Input D4;
Input SE1;
Input se2;

Output dout;

Reg dout;

Always @ (d1 or D2 or D3 or D4 or SE1 or se2)
Case ({SE1, se2 })
2 'b00: dout = D1;
2 'b01: dout = d2;
2 'b10: dout = D3;
2 'b11: dout = D4;
Endcase
Endmodule
Method 2
Module MUX (
D1,
D2,
D3,
D4,
SE1,
Se2,
Dout
);
Input D1;
Input D2;
Input D3;
Input D4;
Input SE1;
Input se2;

Output dout;

Reg dout;

Always @ (d1 or D2 or D3 or D4 or SE1 or se2)
If (! SE1)
Begin
If (! Se2)
Dout = D1;
Else
Dout = d2;
End
Else begin
If (! Se2)
Dout = D3;
Else
Dout = D4;
End

Endmodule
Method 3
Module Se (
D1,
D2,
D3,
D4,
SE1,
Se2,
Dout
);
Input D1;
Input D2;
Input D3;
Input D4;
Input SE1;
Input se2;

Output dout;

Reg dout;

Always @ (d1 or D2 or D3 or D4 or SE1 or se2)
Assign dout = SE1? Se2? D4: D3: se2? D2: d1;
Endmodule

Several methods for implementing the 4-to-1 data selector using OpenGL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.