A RISC CPU from scratch