- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to communicate between two processors mailbox, I wrote the following code por the first processor:
and the following code for the second processor: int main() { load_data(); //Charge le tableau Z depuis le fichier data.h alt_u32 message = 0; alt_mailbox_dev* send_dev; alt_mailbox_dev* rec_dev; // Open the two mailboxes between this processor and another send_dev = altera_avalon_mailbox_open("/dev/mailbox_0"); rec_dev = altera_avalon_mailbox_open("/dev/mailbox_1"); altera_avalon_mailbox_post(send_dev, message); while(message!=0) { message = altera_avalon_mailbox_pend(rec_dev); // Wait for the other processor to send a message back } z6 = (short int*)0x00812028; printf("CPU2: Mr1= %d\t", *(z6)); } I want to communicate between two processors mailbox, I wrote the following code por the first processor: and the following code for the second processor: int main() { alt_u32 message = 0; alt_mailbox_dev* send_dev; alt_mailbox_dev* rec_dev; // Open the two mailboxes between this processor and another send_dev = altera_avalon_mailbox_open("/dev/mailbox_0"); rec_dev = altera_avalon_mailbox_open("/dev/mailbox_1"); while(message!=0) { message = altera_avalon_mailbox_pend(send_dev); // Wait for the other processor to send a message back } load_data(); //Charge le tableau Z depuis le fichier data.h altera_avalon_mailbox_post(rec_dev, message); } i don't know if i am in the right way or not?? can someone help me! thks for all membersLink Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page