1.. SPDX-License-Identifier: BSD-3-Clause 2 Copyright 2021 NXP 3 4NXP LA12xx Poll Mode Driver 5=========================== 6 7The BBDEV LA12xx poll mode driver (PMD) supports an implementation for 8offloading High Phy processing functions like LDPC Encode / Decode 5GNR wireless 9acceleration function, using PCI based LA12xx Software defined radio. 10 11More information can be found at `NXP Official Website 12<https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/layerscape-processors/layerscape-access-la1200-programmable-baseband-processor:LA1200>`_. 13 14Features 15-------- 16 17LA12xx PMD supports the following features: 18 19- Maximum of 8 LDPC decode (UL) queues 20- Maximum of 8 LDPC encode (DL) queues 21- PCIe Gen-3 x8 Interface 22 23Installation 24------------ 25 26Section 3 of the DPDK manual provides instructions on installing and compiling DPDK. 27 28DPDK requires hugepages to be configured as detailed in section 2 of the DPDK manual. 29 30Initialization 31-------------- 32 33The device can be listed on the host console with: 34 35 36Use the following lspci command to get the multiple LA12xx processor ids. The 37device ID of the LA12xx baseband processor is "1c30". 38 39.. code-block:: console 40 41 sudo lspci -nn 42 43... 440001:01:00.0 Power PC [0b20]: Freescale Semiconductor Inc Device [1957:1c30] ( 45rev 10) 46... 470002:01:00.0 Power PC [0b20]: Freescale Semiconductor Inc Device [1957:1c30] ( 48rev 10) 49 50 51Prerequisites 52------------- 53 54Currently supported by DPDK: 55 56- NXP LA1224 BSP **1.0+**. 57- NXP LA1224 PCIe Modem card connected to ARM host. 58 59- Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment. 60 61* Use dev arg option ``modem=0`` to identify the modem instance for a given 62 device. This is required only if more than 1 modem cards are attached to host. 63 this is optional and the default value is 0. 64 e.g. ``--vdev=baseband_la12xx,modem=0`` 65 66* Use dev arg option ``max_nb_queues=x`` to specify the maximum number of queues 67 to be used for communication with offload device i.e. modem. default is 16. 68 e.g. ``--vdev=baseband_la12xx,max_nb_queues=4`` 69 70Enabling logs 71------------- 72 73For enabling logs, use the following EAL parameter: 74 75.. code-block:: console 76 77 ./your_bbdev_application <EAL args> --log-level=la12xx:<level> 78 79Using ``bb.la12xx`` as log matching criteria, all Baseband PMD logs can be 80enabled which are lower than logging ``level``. 81 82Test Application 83---------------- 84 85BBDEV provides a test application, ``test-bbdev.py`` and range of test data for testing 86the functionality of LA12xx for FEC encode and decode, depending on the device 87capabilities. The test application is located under app->test-bbdev folder and has the 88following options: 89 90.. code-block:: console 91 92 "-p", "--testapp-path": specifies path to the bbdev test app. 93 "-e", "--eal-params" : EAL arguments which are passed to the test app. 94 "-t", "--timeout" : Timeout in seconds (default=300). 95 "-c", "--test-cases" : Defines test cases to run. Run all if not specified. 96 "-v", "--test-vector" : Test vector path (default=dpdk_path+/app/test-bbdev/test_vectors/bbdev_null.data). 97 "-n", "--num-ops" : Number of operations to process on device (default=32). 98 "-b", "--burst-size" : Operations enqueue/dequeue burst size (default=32). 99 "-s", "--snr" : SNR in dB used when generating LLRs for bler tests. 100 "-s", "--iter_max" : Number of iterations for LDPC decoder. 101 "-l", "--num-lcores" : Number of lcores to run (default=16). 102 "-i", "--init-device" : Initialise PF device with default values. 103 104 105To execute the test application tool using simple decode or encode data, 106type one of the following: 107 108.. code-block:: console 109 110 ./test-bbdev.py -e="--vdev=baseband_la12xx,socket_id=0,max_nb_queues=8" -c validation -n 64 -b 1 -v ./ldpc_dec_default.data 111 ./test-bbdev.py -e="--vdev=baseband_la12xx,socket_id=0,max_nb_queues=8" -c validation -n 64 -b 1 -v ./ldpc_enc_default.data 112 113The test application ``test-bbdev.py``, supports the ability to configure the PF device with 114a default set of values, if the "-i" or "- -init-device" option is included. The default values 115are defined in test_bbdev_perf.c. 116 117 118Test Vectors 119~~~~~~~~~~~~ 120 121In addition to the simple LDPC decoder and LDPC encoder tests, bbdev also provides 122a range of additional tests under the test_vectors folder, which may be useful. The results 123of these tests will depend on the LA12xx FEC capabilities which may cause some 124testcases to be skipped, but no failure should be reported. 125