A unified optimization framework for simultaneous gate sizing and placement under density constraints