avalon init write_sem before use