projects
/
yosys.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #3310 from robinsonb5-PRs/master
[yosys.git]
/
tests
/
various
/
pmux2shiftx.v
1
module pmux2shiftx_test (
2
input [2:0] S1,
3
input [5:0] S2,
4
input [1:0] S3,
5
input [9:0] A, B, C, D, D, E, F, G, H,
6
input [9:0] I, J, K, L, M, N, O, P, Q,
7
output reg [9:0] X
8
);
9
always @* begin
10
case (S1)
11
3'd 0: X = A;
12
3'd 1: X = B;
13
3'd 2: X = C;
14
3'd 3: X = D;
15
3'd 4: X = E;
16
3'd 5: X = F;
17
3'd 6: X = G;
18
3'd 7: X = H;
19
endcase
20
case (S2)
21
6'd 45: X = I;
22
6'd 47: X = J;
23
6'd 49: X = K;
24
6'd 55: X = L;
25
6'd 57: X = M;
26
6'd 59: X = N;
27
endcase
28
case (S3)
29
2'd 1: X = O;
30
2'd 2: X = P;
31
2'd 3: X = Q;
32
endcase
33
end
34
endmodule
35
36
module issue01135(input [7:0] i, output reg o);
37
always @*
38
case (i[6:3])
39
4: o <= i[0];
40
3: o <= i[2];
41
7: o <= i[3];
42
default: o <= 1'b0;
43
endcase
44
endmodule