V2Xgithub / WiLabV2Xsim

V2X simulator
GNU General Public License v3.0
79 stars 32 forks source link

Question about BRoverlapAllowed #36

Closed ysj4242 closed 7 months ago

ysj4242 commented 7 months ago

Hello, I have a new question.

What role does the code phyParams.BRoverlapAllowed play? From my understanding, when this code is set to true, it allows multiple resources to be reserved in the same BR position simultaneously. Wouldn't this situation lead to collisions between resources? I understand that to prevent such collisions, the 5G NR implements a pre-emption mechanism. Is this code used to activate that pre-emption mechanism?

If my question is unclear, please ask me to clarify. I always receive a lot of help from your simulator, and I'm truly thankful for that.

wzf-cn commented 7 months ago

Hi! The variable phyParams.BRoverlapAllowed is not used to activate the pre-emption.

It allows the packets to overlap with each other. Maybe an example could explain it well:

Let's assume that there are 5 subchannels in the frequency domain, with IDs of 1~5. Each packet will occupy 2 subchannels to be transmitted.

  1. If phyParams.BRoverlapAllowed is true, there would be 4 possible beacon resources to transmit a packet, which are subchannels [1,2], [2,3], [3,4], and [4,5]. In this case, a part of the signal of the packet might overlap with others', but the resource selection procedure would "try its best" to deal with it.
  2. If phyParams.BRoverlapAllowed is false, there would be only 2 possible beacon resources to transmit a packet, which are subchannels [1,2] and [3,4].
ysj4242 commented 7 months ago

I've understood it perfectly! Thank you so much for your response!