aboutsummaryrefslogtreecommitdiffstats
path: root/libs/subcircuit/test_macc22.txt
blob: 71938c1c18129cc258de66d5f3da40b29a840e3d (plain)
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
44
45
46
47
48
# verbose

graph macc22
	node mul_1 mul A 32 B 32 Y 32
	node mul_2 mul A 32 B 32 Y 32
	node add_1 add A 32 B 32 Y 32
	connect mul_1 Y add_1 A
	connect mul_2 Y add_1 B
	extern mul_1 A B
	extern mul_2 A B
	extern add_1 Y
endgraph

graph macc4x2
	node mul_1 mul A 32 B 32 Y 32
	node mul_2 mul A 32 B 32 Y 32
	node mul_3 mul A 32 B 32 Y 32
	node mul_4 mul A 32 B 32 Y 32
	node add_1 add A 32 B 32 Y 32
	node add_2 add A 32 B 32 Y 32
	node add_3 add A 32 B 32 Y 32
	connect mul_1 Y add_1 A
	connect mul_2 Y add_1 B
	connect mul_3 Y add_2 A
	connect mul_4 Y add_2 B
	connect add_1 Y add_3 A
	connect add_2 Y add_3 B
	extern mul_1 A B
	extern mul_2 A B
	extern mul_3 A B
	extern mul_4 A B
	extern add_3 Y
endgraph

solve macc22 macc4x2
expect 2

swapgroup mul A B

solve macc22 macc4x2
expect 2

swapperm add A B : B A

solve macc22 macc4x2
expect 4