Make sure to set timeout to 100ms instead of 1ms in avalon read loop for select.