BabbleSim / base

BabbleSim base/common components. Any BabbleSim user will want some of these.
13 stars 2 forks source link

Question about devices stopped during debug #3

Closed rcvlr closed 1 year ago

rcvlr commented 1 year ago

Hi! In the documentation is written

"If an instrumented device is stopped in, say, a breakpoint, all other devices will be waiting blocked in libPhyCom."

How does this happen? How do the other devices and the PHY know they have to stop waiting for the device under debug to resume from the breakpoint. Also, what are other situations when this happens?

aescolar commented 1 year ago

The other devices are stalled by the Phy (The phy does not respond (yet) with the result of their Rx attemps, or their wait request ends). The Phy knows the device is not progressing because it does not say what it wants to do next after a previous procedure. https://github.com/BabbleSim/ext_2G4_phy_v1/blob/master/docs/README_design.md#overall-workings

rcvlr commented 1 year ago

Ok, thanks. I see now that the PHY get stuck in the read in pb_phy_get_next_request() until the device that is stopped (for example, in a breakpoint) resumes. https://github.com/BabbleSim/base/blob/77f627d61b941b37eb7be42b4f92e75aa630b0ee/libPhyComv1/src/bs_pc_base.c#L405

aescolar commented 1 year ago

Closing as answered.