added nios2io code by @patstrom