function [:] sm2tc;
input [:] din;
reg [:] dp;
reg [:] dn;
reg [:] dout;
begin
dp = {'b0, din[14:0]};
dn = ~dp + 'b1;
dout = (din[] == 'b1) ? dn : dp;
sm2tc = dout;
end
endfunction
2024-02-05 18:40:10
function [:] sm2tc;
input [:] din;
reg [:] dp;
reg [:] dn;
reg [:] dout;
begin
dp = {'b0, din[14:0]};
dn = ~dp + 'b1;
dout = (din[] == 'b1) ? dn : dp;
sm2tc = dout;
end
endfunction