Generalised feedback shift register