-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMUX3.v
More file actions
40 lines (36 loc) · 1.03 KB
/
MUX3.v
File metadata and controls
40 lines (36 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 01/27/2019 12:25:52 PM
// Design Name:
// Module Name: MUX3
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module MUX3(
input [7:0] in1, // First input
input [7:0] in2, // Second input
input [7:0] in3, // Third input
input [7:0] inpu4, // Fourth input
input [1:0] ctr, // Control signal to select the input
output reg [7:0] out // Output
);
always @(*)
case(ctr)
2'b00: out = in1; // Select first input
2'b01: out = in2; // Select second input
2'b10: out = in3; // Select third input
2'b11: out = inpu4; // Select fourth input
endcase
endmodule