onion2014
Member level 1
- Joined
- Mar 25, 2013
- Messages
- 35
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- NY
- Activity points
- 1,574
Hi ALL,
I have a question about when the AHB can be deadlocked. I get this question in the AMBA protocol pdf from ARM but it seems that it's not clear enough for me. And I found something in the ARM information Center, which says:
"
Does a master need to issue non-LOCKed accesses when accessing a sequence of AHB slaves ?
Applies to: AHB, AMBA Design Kit (ADK), Micropack v2.0
Answer
If a master performs lots of back-to-back LOCKed access sequences, the selected slave has no idea when one sequence ends and a new one starts.
In a multi-layer AHB system, if one master is performing LOCKed accesses to a slave, no other master can access that slave until the LOCKed sequence has ended.
If in that multi-layer system the master attempts LOCKed accesses to a number of slaves, each NOT ending with unLOCKed accesses, that master will progressively LOCK up more and more of the system slaves, stopping other masters accessing them.
There is then a risk of system deadlock if 2 masters attempt LOCKed sequences crossing between 2 different slaves, one to slave A then slave B, and the other to slave B then slave A. Each master will complete its LOCKed transfers to the first slave, but will then be deadlocked because the other master has not released the first slave. Reset (or a SPLIT/RETRY response from one slave) would be the only way out of this.
The ADK BusMatrix insists that LOCKed sequences do not cross between different slaves, so deadlock is not possible.
"
My QUESTION is when AHB deadlock happens and how to avoid it. I the red paragraph, let's say Master1 tries slaveA and then slaveB. then Master2 tries slaveB and then slaveA. then what happens after this......
Thanks in advance
I have a question about when the AHB can be deadlocked. I get this question in the AMBA protocol pdf from ARM but it seems that it's not clear enough for me. And I found something in the ARM information Center, which says:
"
Does a master need to issue non-LOCKed accesses when accessing a sequence of AHB slaves ?
Applies to: AHB, AMBA Design Kit (ADK), Micropack v2.0
Answer
If a master performs lots of back-to-back LOCKed access sequences, the selected slave has no idea when one sequence ends and a new one starts.
In a multi-layer AHB system, if one master is performing LOCKed accesses to a slave, no other master can access that slave until the LOCKed sequence has ended.
If in that multi-layer system the master attempts LOCKed accesses to a number of slaves, each NOT ending with unLOCKed accesses, that master will progressively LOCK up more and more of the system slaves, stopping other masters accessing them.
There is then a risk of system deadlock if 2 masters attempt LOCKed sequences crossing between 2 different slaves, one to slave A then slave B, and the other to slave B then slave A. Each master will complete its LOCKed transfers to the first slave, but will then be deadlocked because the other master has not released the first slave. Reset (or a SPLIT/RETRY response from one slave) would be the only way out of this.
The ADK BusMatrix insists that LOCKed sequences do not cross between different slaves, so deadlock is not possible.
"
My QUESTION is when AHB deadlock happens and how to avoid it. I the red paragraph, let's say Master1 tries slaveA and then slaveB. then Master2 tries slaveB and then slaveA. then what happens after this......
Thanks in advance