5g nr sib1 recovery for fr1 and fr2 using xilinx rfsoc device -凯发k8网页登录
this example shows how to deploy a 5g nr sib1 recovery algorithm for fr1 and fr2 in simulink® using soc blockset® to target a xilinx zynq® ultrascale ™ rfsoc zcu111 evaluation board.
supported hardware platforms
this example supports the xilinx zynq® ultrascale ™ rfsoc zcu111 evaluation kit xm500 balun card
introduction
this example implements a sib1 recovery algorithm as a hardware-software (hw/sw) co-design implementation targeted to a xilinx rfsoc device. this example is one of a related set. for more information see (wireless hdl toolbox).
this figure shows a conceptual overview of the sib1 recovery algorithm.
the design is partitioned into sections for implementation on hardware and software.
ssb detection, ssb decoding, coreset grid demodulation, pdcch decoding, and ldpc decoding require high-speed signal processing. these parts of the design are well-suited for fpga implementation and are targeted to the programmable logic (pl) on the rfsoc device. the model uses dsp hdl toolbox™ and wireless hdl toolbox™ blocks to implement the fpga signal processing algorithms.
the control and resource allocation calculations that the search controller, pdcch software, and pdsch software perform are low rate and well-suited for software implementation using the arm® processing system (ps). code generation from 5g toolbox™ is used for functions calculating the pdcch and pdsch resource allocations, and the pdsch channel estimation and equalization.
setup
this example requires the soc blockset support package for xilinx devices. for more information on setup and configuration of the tools, see setup and configuration.
top-level model
the top-level model, soc_nrhdlsib1recovery_top
, shows the complete design. the model references the hardware and software models and shows the interfacing between the pl and ps. the model uses axi-stream and axi-lite interfaces to pass data between the ps and pl. the external ddr, which is used to store a waveform for testing the system, connects to the pl. the rf data converter block sets the parameters for the rf data converter on the hardware and connects to the pl.
when you run the model on the rfsoc hardware, the sib1 receiver requires a 5g waveform from the adcs in the rf data converter or a test waveform loaded to the external ddr memory. when the top-level model is opened it calls socnrsib1_simulationsetup.m
, which generates a waveform and creates a variable, ddrinitdata
, which is used as the initial value for the external ddr for simulation. to explore the behavior of the 5g sib1 recovery algorithm, see the (wireless hdl toolbox) example. for the design in this example to detect 5g sib1, deploy it to a zcu111 development board, and load a 5g test waveform into the ddr memory to provide a valid input to the receiver algorithm.
rf data converter configuration
the rfsoc device has an rf data converter connected to the programmable logic. the rf data converter block configures the parameters of the rf data converter on the rfsoc hardware. the rf data converter configuration for the zcu111 development board uses direct rf sampling to downconvert the rf signals. this configuration causes aliasing of any signals that are in lower nyquist zones unless these signals are filtered out before the input to the adcs. for this reason, external analogue filtering is required if you want to use the design with over-the-air 5g signals, or with loopback over the rf interface. refer to the xilinx product guide for the rfsoc data converter, , for more information.
the adcs and dacs use a clock rate of 245.76mhz at the interface with the fpga, with two samples per clock. this configuration results in a sample rate of 491.52 mhz. to achieve a sample rate of 3932.16 mhz at the adc and the dac, the rf data converter decimates and interpolates by a factor of 8. the rf data converter uses the dac5 from tile2 and adc3 from tile2, which correspond to connections j7 and j2 on the xm500 balun card, respectively.
fpga logic design
the soc_nrhdlsib1recovery_fpga
simulink model contains the fpga part of the design. this model implements the sib1 receiver hardware algorithm, axi interfacing logic, and waveform playback from external memory as shown in the diagram. for more information about the sib1 receiver hardware algorithm, see the (wireless hdl toolbox) and (wireless hdl toolbox) examples. the axi stream interfacing subsystems format the data the fpga sends to, and receives from, the embedded software part of the design.
the transmit-repeat subsystem soc_nrhdlsib1recovery_fpga/dut/transmit repeat
controls the input waveform to the nr receiver on the hardware.
the external memory access
subsystem reads data from the external ddr memory using the input parameters specifying the memory base address, number of bursts, and last burst length to control the read process. configure the input parameters for external memory access using the axi-lite input ports. when you enable the external memory access
subsystem it loops through the data stored in the ddr, repeating the stored waveform. use the ddr waveform used directly as an input to the sib1 receiver or loop back through the dacs and adcs in the rf data converter. you can use the loopback
input to control waveform looping inside the radio interface
subsystem. when you set loopback
to 1 the waveform is loops back through the dacs and adcs, provided you connect cables or antennas on the hardware to facilitate this.
you can also add noise and a frequency offset to the waveform by using the channelawgnen
, channelnoisepow
, and channelfrequencyoffset
input ports. these impairments are added within the channel subsystem. the rate convert subsystem passes the signals through without modification.
processor logic design
the soc_nrhdlsib1recovery_proc
simulink model contains the software part of the design. this model implements the cell search control algorithm, pdcch software processing, pdsch software processing, and axi interfacing logic to communicate with the fpga.
this model has a mask to set parameters specific to the waveform and controlling waveform playback. clicking on an instance of the model opens the block parameters dialog window. the parameters in this dialog window are set using variables in the base workspace. the model initializes the variables to zero. the variables are set to the appropriate values when you run socnrsib1_externalmodesetup
script with the design deployed on the target hardware.
the blocks in the signals from fpga
section provide the axi-lite and axi-stream interfacing for the inputs to the software algorithm. the blocks in the signals to fpga
section provide the axi-lite and axi-stream interfacing for the outputs from the software algorithm. the signals grouped in the axilite to fpga txrepeat
subsystem are used to configure the waveform playback from ddr on the fpga. the blocks in the udp send to host
section send selected data over udp. use the soc_nrhdlsib1recovery_hostudpreceive
model to receive this data.
the setupfreqdependantparams
matlab function block initializes frequency-dependent parameters required for the software processing algorithm. the ssb subcarrier spacing, ssb block pattern, lmax, and minimum channel bandwidth are dependent on the carrier frequency. set usecentrefrequency
input to true
to derive the parameters from the centrefrequency
input port. set usecentrefrequency
to false to use the parameters defined on the input ports. these parameters are available in the model mask. the model sets the initial parameter values to zero and updates them based on the test waveform generated using the socnrsib1_externalmodesetup
matlab script.
the axistreamdemux
subsystem demultiplexes the axi-stream data it receives from the fpga. the data stream contains pss reports, ssb grid data, sib1 grid data, and sib1 bits at different stages of the decoding process. the axistreamdemux
subsystem routes the data to the appropriate subsystems.
the cell search controller
subsystem controls the initial search for ssbs in the received waveform. this subsystem instructs the fpga to search for ssbs at a given frequency offset and subcarrier spacing. when the fpga completes the ssb search, it reports the results back to the software. the cell search controller
processes the results and selects an ssb for further decoding. for more information about the cell search process, see nr hdl cell search (wireless hdl toolbox).
the sib1 sw processing
subsystem uses the sib1 grid recovered by the fpga and sent on the axi-stream interface. this subsystem locates the sib1 resources within the sib1 grid and, using hardware accelerators on the fpga, decodes the dci message from coreset0 and decodes the sib1 message. the subsystem formats the sib1 grid to the required dimensions and locates the coreset0 and pdcch resources for sib1 within the sib1 grid. the subsystem sends coreset0 resources to the fpga over axi-stream. the hardware accelerator performs channel estimation and equalization, pdcch, and polar decoding. the fpga hardware accelerator returns the dci data decoded form the coreset0 to the software using axi-lite. the subsystem uses the dci data to locate the pdsch resources allocated to the sib1 message. the subsystem performs channel estimation and equalization for the pdsch data and passes the dlsch codeword the fpga hardware over axi-stream. the hardware accelerator performs rate recovery, ldpc, and crc decoding.
when the fpga successfully decodes the sib1 message, it returns the sib1 bits over the axi-stream interface. the sib1error
axi-lite input indicates whether the crc detects any errors. the software returns the sib1 bits to the host via the udp interface.
simulation
to confirm the basic operation of the design you can simulate the top-level model, soc_nrhdlsib1recovery_top
, using a 5g waveform stored in the ddr memory. the socnrsib1_simulationsetup.m
script generates a 5g waveform and sets up the workspace variables required to run the simulink simulation. the script is called when the soc_nrhdlsib1recovery_top
model is opened. it can be called before running the simulation to reinitialize the variables, if required. because of the complexity of the models and high sample rates, the simulation can take several hours. the simulation behavior of the fpga design is explored in more detail in the (wireless hdl toolbox).
the simulation data inspector can be used to plot signals from the model and explore the simulation behavior, as shown in the figure. if sib1 recovery is successful, sib1bitsvalid
will be asserted high and sib1error
will remain low as shown in the plot.
host model
the run the soc_nrhdlsib1recovery_hostudpreceive
host model on the host computer to receive udp messages from the deployed system when it is running on the rfsoc device.
use the manual switch in the stop logic
group of blocks to stop the model after receiving sib1 bits, or to continue running until you stop the model manually. the model displays pss snr, sss snr, and decoded cell id. the mib parameters and sib1 bits are available as workspace variables.
deploy design
open the soc_nrhdlsib1recovery_top
model and set the hardware board option in the system on chip tab of the simulink toolstrip to xilinx zynq ultrascale rfsoc. open by selecting configure, build, & deploy from the system on chip tab of the simulink toolstrip.
select build model on the setup screen. click next.
click view/edit memory map to view the memory map on the review memory map screen. click next.
specify the project folder on the select project folder screen. click next.
select build and load for external mode on the select build action screen. click next.
click validate on the validate model screen to check the compatibility of the model for implementation. click next.
click build on the build model screen to begin building the model. an external shell opens when fpga synthesis begins. this step can take a long time to complete. click next.
click test connection on the connect hardware screen to test the connectivity of the host computer with the soc board. click next to go to the run application screen. click load to program the board with the bitstream.
after you load the bit file the board, you can run the generated software model in external mode to run the system on the board. if the generated software model is not already open, open soc_nrhdlsib1recovery_top_sw
, which is in the project folder that you specify in the soc builder tool. before you run the software on the board, you must load a waveform to the ddr memory. run the socnrsib1_externalmodesetup
script to generate a waveform and write it to the ddr on the board using the ethernet interface. this script also initializes the variables in the software that specify parameters related to the waveform.
to perform loopback over the dac and adc interface on the hardware you must connect a cable between j7 and j2 on the xm500 balun card, with a 3000-4300 mhz bandpass filter in-line. you must also enable loopback in the mask of the software model reference in the soc_nrhdlsib1recovery_top_sw
model by clicking on the sw_inst
block and setting enable loopback to 1. if you set simulation mode in the dialog window to accelerator then enable loopback is run-time configurable. the other variables on this mask are set when you run socnrsib1_externalmodesetup
.
after you load a waveform to the ddr on the board, you can run the soc_nrhdlsib1recovery_top_sw
model in external mode by selecting monitor & tune from the system on chip tab of the simulink toolstrip. by default, the model runs for 10 seconds. to modify the run time, set the stop time on the simulink toolstrip. use the simulink data inspector to monitor logged signals in the software model while it is running and review the data once the model has stopped. this figure shows several logged signals from the software model when it successfully decodes sib1. hardware start
, softwarestart
, and detectionstatus
signals show the initial cell search process. the detectionstatus
signal indicates the status of the cell search. a value of 8 indicates successful demodulation of mib resource grid. the sib1status
signal shows the status of the sib1 decoding process. a value of 5 indicates there were not errors detected in the crc for sib1. the value of sib1bitsvalid
indicates the sib1 bits are sent from the fpga to the software. the sib1error
signal indicates that no errors were found in the sib1 crc.
run the soc_nrhdlsib1recovery_hostudpreceive
host model while the deployed software model is running to receive udp messages containing the sib1 bits, mib parameters, and pss and sss reports.
implementation results
the table shows the post-implementation resource utilization results for the complete pl design, targeted to a zcu111 evaluation board.
resource usage percentage _____________ ______ __________ clb registers 208293 24% clb luts 148362 35% ramb18 431 20% ramb36 76 7% dsp48 316 7%
see also
blocks
- | | | | | | | | |