Forum Discussion
Altera_Forum
Honored Contributor
12 years agoI will assign all 4 numbers to 4 registers first named as reg1,reg2,reg3,reg4 (in decreasing value eventually).
at start(reset) update them with A,B,C,D respectively. in s0 : check A Vs B and update reg1,reg2 if A < B in s1: check A Vs C and update reg1,reg3 if A < C in s2: check A Vs D and update reg1,reg4 if A < D now reg1 is done and is having value of highest of 4, so now you need to check reg2,reg3,reg4 in the same way finally you check reg3,reg4 and you are done