How I can find maximum number in verilog array
问题 So, I have a reg[7:0] corr_Output[0:63]; which is filled with values in my module. How I can find maximum number in this array at one CLK cycle? I wrote a 8 bit comparator: module Comparator2D( input [7:0] X1, input [7:0] indexX1, input [7:0] X2, input [7:0] indexX2, output [7:0] Y, output [7:0] indexY ); always begin if (X1 > X2) begin Y = X1; indexY = indexX1; end else begin Y = X2; indexY = indexX2; end end endmodule But I dont know how I should instantiate this module in my top design? I