Difference.emam 221 Bytes
Newer Older
Malte Heithoff's avatar
Malte Heithoff committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package de.rwth.pacman.common;

component Difference<N1 n=2> {
	port
		in Q in1[n],
		out Q out1;

	implementation Math{
	    Q outVal=in1(1);
	    for i=2:n
	        outVal=outVal-in1(i);
	    end
	    out1=outVal;
	}
}