Forum Discussion
Altera_Forum
Honored Contributor
17 years agoNIOS II Control Unit (CU)
hi, I want know who can I send an instruction from NIOS II to another NIOS II processor. when I want execute an instruction I send it to the other processor. can nios II do this?? than...
Altera_Forum
Honored Contributor
17 years agoI mean the following. Your NIOS master puts a coded instruction (or one already decoded, "one-hot" bit instruction code) in the PIO output port. This is a simple IOWR write in C code. The slave processors have each one a PIO input port (which is externally, HDL, connected to the master's PIO port). So, as soon as the master puts the instruction out, all the slaves see it. You can even implement an interrupt routine in the slaves processors, if you want. In any case, the input PIO can be read with a simple IORD in C. Then, the instruction will be decoded (if needed) in each slave and executed separately in each processor.
Another way could be to implement a custom instruction in the master, which connects directy to the input PIO in the slaves processors. The process is more or less the same.