module max2_func (
input [7:0] a,
input [7:0] b,
output [7:0] max
);
// ---------- Predefined function (complete the body) ----------
function [7:0] max2;
input [7:0] x, y;
begin
if(x < y) max2 = y; else max2=x;
// TODO: write the single comparison line below:
// max2 = ( /* condition */ ) ? /* ... */ : /* ... */ ;
end
endfunction
// -------------------------------------------------------------
assign max=max2(a,b);
// TODO: call the function to produce the output
// assign max = max2( /* ... */ , /* ... */ );
endmodule