Forum Discussion
Altera_Forum
Honored Contributor
16 years ago"readyfordata" won't work
Hi Guys, I'm trying to build an MM Slave component with dataflow control and got some problem. It is very important, that if the target is not ready to receive data then NIOS must stop writing ...
Altera_Forum
Honored Contributor
16 years ago>would freeze the CPU until the slave is ready to receive data
:-) Yes, that is true, if anyone has no experience in software writting. So this way: WriteDataSub { while (! peripheria_ready); ...write out data; } is wrong. This really freezes the CPU. But this code: WriteDataSub { if (! peripheria_ready) return; ...write out data; } Uisng timer or IRQ gives the chance to use the 2nd version using very thin slice of CPU time.