Graphcore interview question

(white boarding question) Implement a circular buffer algorithm on the whiteboard and explain your though process.