synthesizable code

negative flag is remaining. Otherwise its passing simulation and also
synthesis in quartus