A Simulation Based Buffer Sizing Algorithm for Network on Chips