[sim] +debug code for write iv;