How do you plan to solve it?
module abs8_func ( input signed [7:0] a, output [7:0] abs ); function [7:0]abs8; input [7:0]x; begin abs8 = x[7]?-x:x; end endfunction assign abs = abs8(a); endmodule