modefied apple_out.v and add simulation