Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_init_rate_match(k, n) gives wrong CRC degree #77

Closed
catkira opened this issue Dec 10, 2022 · 3 comments
Closed

_init_rate_match(k, n) gives wrong CRC degree #77

catkira opened this issue Dec 10, 2022 · 3 comments

Comments

@catkira
Copy link
Contributor

catkira commented Dec 10, 2022

I want to decode the PBCH. In matlab I can do it like this

    iBIL = false;
    iIL = true;
    crcLen = 24;
    nMax = 9;
    A = 32;
    P = 24;
    K = A+P;
    N = 512;
    decIn = nrRateRecoverPolar(pbchBits_csi,K,N,iBIL);
    decBits = nrPolarDecode(decIn,K,E,polarListLength,nMax,iIL,crcLen);

However when I try it with sionna like this

    from sionna.fec.polar import PolarEncoder, Polar5GEncoder, PolarSCLDecoder, Polar5GDecoder, PolarSCDecoder
    enc = Polar5GEncoder(k=K, n=864)
    dec = Polar5GDecoder(enc, dec_type="SCL", list_size=8)
    dec(np.expand_dims(pbchBits_csi, 0))

I get a wrong (different than matlab) result. I know the matlab result is correct, because the CRC gives 0.
I found something suspicious with enc._init_rate_match(k, n), when I call it with k=54 and n=512 (or n=864) it gives CRC order 11, but it should be 24 (24C CRC polynomial). Is this a bug?

@catkira
Copy link
Contributor Author

catkira commented Dec 10, 2022

I just read that only uplink is implemented sionna, but what I want to do is decode downlink, is that the problem?

@catkira
Copy link
Contributor Author

catkira commented Dec 11, 2022

yes. that seems to be the problem. It would be nice if the Polar5GEncoder had another parameter, to set up- or downlink mode. Some things are different for up- and downlink, they are very well summarized in table I of this paper https://arxiv.org/pdf/1804.04389.pdf

@jhoydis
Copy link
Collaborator

jhoydis commented Dec 13, 2022

Yes, Sionna currently only supports the uplink (as stated in the documentation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants