optimization + wait state accuracy change

fix sram wait state init value, and optimize some stuff.