projects
/
yosys.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #1167 from YosysHQ/eddie/xc7srl_cleanup
[yosys.git]
/
techlibs
/
common
/
pmux2mux.v
1
module \$pmux (A, B, S, Y);
2
3
wire [1023:0] _TECHMAP_DO_ = "proc; clean";
4
5
parameter WIDTH = 1;
6
parameter S_WIDTH = 1;
7
8
input [WIDTH-1:0] A;
9
input [WIDTH*S_WIDTH-1:0] B;
10
input [S_WIDTH-1:0] S;
11
output reg [WIDTH-1:0] Y;
12
13
integer i;
14
15
always @* begin
16
Y <= A;
17
for (i = 0; i < S_WIDTH; i=i+1)
18
if (S[i]) Y <= B[WIDTH*i +: WIDTH];
19
end
20
21
endmodule