projects
/
yosys.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #1814 from YosysHQ/mmicko/pyosys_makefile
[yosys.git]
/
tests
/
simple
/
wandwor.v
1
module wandwor_test0 (A, B, C, D, X, Y, Z);
2
input A, B, C, D;
3
output wor X;
4
output wand Y;
5
output Z;
6
7
assign X = A, X = B, Y = C, Y = D;
8
foo foo_0 (C, D, X);
9
foo foo_1 (A, B, Y);
10
foo foo_2 (X, Y, Z);
11
endmodule
12
13
module wandwor_test1 (A, B, C, D, X, Y, Z);
14
input [3:0] A, B, C, D;
15
output wor [3:0] X;
16
output wand [3:0] Y;
17
output Z;
18
19
bar bar_inst (
20
.I0({A, B}),
21
.I1({B, A}),
22
.O({X, Y})
23
);
24
25
assign X = C, X = D;
26
assign Y = C, Y = D;
27
assign Z = ^{X,Y};
28
endmodule
29
30
module foo(input I0, I1, output O);
31
assign O = I0 ^ I1;
32
endmodule
33
34
module bar(input [7:0] I0, I1, output [7:0] O);
35
assign O = I0 + I1;
36
endmodule