Giter VIP home page Giter VIP logo

Hello,Dr.jiao. I have a question about the contention window of the csma code. I know that the traditional backoff window CWmin for CSMA/CA is 16, but the random number generation section in the csma_ca code starts from 2. How is this section defined? Or that I misunderstand the meaning of the source code? about openwifi-hw HOT 4 CLOSED

open-sdr avatar open-sdr commented on May 14, 2024
Hello,Dr.jiao. I have a question about the contention window of the csma code. I know that the traditional backoff window CWmin for CSMA/CA is 16, but the random number generation section in the csma_ca code starts from 2. How is this section defined? Or that I misunderstand the meaning of the source code?

from openwifi-hw.

Comments (4)

JiaoXianjun avatar JiaoXianjun commented on May 14, 2024

Can you elaborate in more detailed style? Such as which line of code in which kind of state transition in CSMA/CA part?

from openwifi-hw.

liulangkk avatar liulangkk commented on May 14, 2024

https://github.com/open-sdr/openwifi-hw/blob/master/ip/xpu/src/csma_ca.v
line239-279 is random number generator. In my view I know that it corresponds to the different stage of the backoff.
According to the cw_exp module, it can be seen that based on the retransmission trigger, the cw_exp+1 operation will be executed, which corresponds to the random number generation part in csma_ca. According to the CSMA/CA protocol (as described in most publicly available sources), the minimum contention window is randomly selected from within 16. My question is regarding the random number generation code in which, when cw_exp_used is set to 1, 2, or 3, the corresponding random number ranges are 2, 4, and 8, respectively. This may differ slightly from what I understand about the protocol, or this design may have a specific purpose, or perhaps I have misunderstood something.

from openwifi-hw.

HavingaThijs avatar HavingaThijs commented on May 14, 2024

That part ensures that every possible value of the CW exponential can be used. While CWmin for the normal Distributed Coordination Function (DCF) is 15 (2^4-1), for Enhanced Distributed Channel Access (EDCA) it depends on the QoS type and may be lower than 15.
CWmin and CWmax are decided by Linux’ mac80211 or it can be overwritten by register 19 of the xpu (see https://github.com/open-sdr/openwifi/blob/master/doc/README.md#get-and-set-a-register-of-a-module).

from openwifi-hw.

liulangkk avatar liulangkk commented on May 14, 2024

Thank you for your patient answer! This answer helps me a lot understand the meaning of the csma/ca code.

from openwifi-hw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.