cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
3,185 Views
Registered: ‎06-24-2010

dual microblaze processor with shared resources

Hello to all,

 

Is there any examples on how to use the XPS_MUTEX ? I read the XAP996, but I don't understand a thing: how does the mutex know which the shared resource is and how to use a XPS_MUTEX to control more then one shared resources. 

 

In XAPP996 example one XPS_MUTEX control the access to the shared RS232_1 UART. Is there possible to use the same XPS_MUTEX to control the access to another resourse (let's say GPIO LEDs) ? How does the mutex know witch one of the shared resources should be controlled ?

 

Kind regards,

Iulian

 

 

0 Kudos
Reply
2 Replies
joshual
Xilinx Employee
Xilinx Employee
3,126 Views
Registered: ‎08-01-2007

Yep, it is possible ,you should check the and set the mutex in software while accessing the shared resouce.

0 Kudos
Reply
thatwackyguy
Visitor
Visitor
3,023 Views
Registered: ‎06-29-2010

I'd like a few more details on the XPS_Mutex. The documentation says

"Only one interface at the time can access any of the mutexes, i.e. all other PLB interfaces are blocked while one is accessing any of the mutexes."

 

How does this work if one interface is waiting for another to release the lock? I assume it must still be possible for one interface to slip in its write (unlock) between each write/read (lock attempt) on another interface?

 

How about if one interface has multiple threads accessing the different mutexes in the mutex core. Can all those occur safely? They should all be accessing independent memory, but it would be nice to know for sure.

0 Kudos
Reply