Advanced evolution of massive stars. VII. Silicon burning