module abs8_func (
input signed [7:0] a,
output [7:0] abs
);
// ---------- Write function here----------
function automatic [7:0] abs8(input signed [7:0] a);
abs8 = (a < 0) ? -a : a;
endfunction
// Function called here
assign abs = abs8(a);
endmodule