-
Notifications
You must be signed in to change notification settings - Fork 0
/
mux2_2.v
43 lines (40 loc) · 857 Bytes
/
mux2_2.v
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
41
42
43
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 13:01:36 12/18/2012
// Design Name:
// Module Name: mux2_2
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module mux2_2(turn, change, m_bit, s_bit, out2mux_h, out2mux_m);
input turn;
input change;
input m_bit;
input s_bit;
output out2mux_h;
output out2mux_m;
reg out2mux_h;
reg out2mux_m;
always@(turn or change or m_bit or s_bit)begin
if(turn == 1)begin
out2mux_h = change;
out2mux_m = s_bit;
end
if(turn == 0)begin
out2mux_h = m_bit;
out2mux_m = change;
end
end
endmodule