Forum Discussion
3 Replies
- Altera_Forum
Honored Contributor
If the NIOS is running with the 50MHz clock, then each instruction takes one clock cycle. It takes more than one instruction to do the IO write, so unless I am mistake you won't be able to do it directly.
What you could do is have a custom component which contains a small FIFO and some read/write logic. First you load the data into the FIFO. Then you have the component transmit the data at the correct speed (one word per cycle). You could have logic which detects when 5 words of data have been loaded and then immediately start sending, or you could have a start bit which the NIOS has to write to once the data is loaded. For the latter option, as NIOS is 32 bit, you could have the NIOS send five 32bit symbols, the lower 16 of which are your data, and then one of the other bits (e.g. bit 31) could be used to signify that this is the last packet. When the fifo detects that bit 31 is set, then it starts sending. That way the two never get out of sync if say the Nios crashed and reset. - Altera_Forum
Honored Contributor
tha's very helpfull. thank you
- Altera_Forum
Honored Contributor
Hello Can you share the docs for this task because i also want to do same task like i want to pass 8 integer data to my custom component.