Altera_Forum
Honored Contributor
19 years agoRunning Multiprocessor session
Hey all,
I want to run a multiprocessor collection including HW configurations of 2 processors (tx & rx). There's a handshaking system between both processors based on polling as each processor has an o/p and an i/p PIO that is connected to the i/p and the o/p PIOs of the other cpu respectively. I tried it in debug session and it worked right but I had a debug a step here and then a step there in both projects' threads in order to make it work. I now want to make it run in automatic mode and both processors perform the required operation without my help. When I pressed "Run", the cpu1 program only runs !! I used "printf" clauses at the beginning of each program to make sure of each of the cpu's start. That's the code: /*tx code*/# include "tx_h.h" # define pio_out_cpu1_BASE 0x008009B0# define pio_in_cpu1_BASE 0x008009A0 int main() { printf("start tx"); IOWR_ALTERA_AVALON_PIO_DATA(pio_out_cpu1_BASE, 0x0); /* my code here */ volatile int input; IOWR_ALTERA_AVALON_PIO_DATA(pio_out_cpu1_BASE, 0x1);//data ready do{ input=IORD_ALTERA_AVALON_PIO_DATA(pio_in_cpu1_BASE); }while (input!=1); IOWR_ALTERA_AVALON_PIO_DATA(pio_out_cpu1_BASE, 0x0); printf("end tx"); return 0; } /********************************************* *********************************************/ /* rx code */ # include "rx_h.h" # define pio_in_cpu2_BASE 0x00800920# define pio_out_cpu2_BASE 0x00800930 int main() { printf("start rx"); IOWR_ALTERA_AVALON_PIO_DATA(pio_out_cpu2_BASE,0x0);//device ready volatile int input; do{ input=IORD_ALTERA_AVALON_PIO_DATA(pio_in_cpu2_BASE); }while (input!=1); IOWR_ALTERA_AVALON_PIO_DATA(pio_out_cpu2_BASE,0x1); do{ input=IORD_ALTERA_AVALON_PIO_DATA(pio_in_cpu2_BASE); }while (input!=0); IOWR_ALTERA_AVALON_PIO_DATA(pio_out_cpu2_BASE,0x0); /* my code here */ printf("end rx"); return 0; } /******************************************** ********************************************/ => I get only in the console screen "start tx" and "end tx" inspite of making a multiprocessor collection with the 2 projects included !!!