Signed numbers use the twos-complement format. that is if interpreted as unsigned they will appear as large numbers, the second half of the unsigned number range.
If any section of a comparison is unsigned then the comparison is unsigned. Selecting bit widths, even if the whole range, is unsigned
reg signed [8:0] sin_hall2;
initial begin
sin_hall2 = -9'd169 ;
$display( "Comparison unsigned : %b ", sin_hall2 > 9'd1 );
$display( "Comparison cast : %b ", sin_hall2 > $signed(9'd1) );
$display( "Comparison signed : %b ", sin_hall2 > 9'sd1 );
$display( "Comparison signed [8:0]: %b ", sin_hall2[8:0] > 9'sd1 );
end
Returns:
# Comparison unsigned : 1
# Comparison cast : 0
# Comparison signed : 0
# Comparison signed [8:0]: 1
Example on EDA Playground.