code cleanups.
reduced generated frequency due to some issues in sdram ctrl with 100mhz clock.
implemented ceil function without loops (due to simulator complains).