Max.emam 222 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
16
package de.rwth.pacman.common;

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

	implementation Math{
	    Q maxVal = in1(1);

	    for i=2:n
	        maxVal=max(maxVal,in1(i));
	    end
	    out1=maxVal;
	}
}