main content

5g nr mib recovery using xilinx rfsoc device -凯发k8网页登录

this example shows how to simulate and deploy a 5g nr mib recovery algorithm in simulink® using an soc blockset™ implementation targeted on the xilinx® zynq® ultrascale ™ rfsoc zcu111 evaluation board. using this example, you can recover, demodulate a primary synchronization signal (pss) and secondary synchronization signal (sss) and decodes mib report from the 5g nr waveforms and simulate the cell search control algorithm sequence running on a processor while interacting with the cell search hardware algorithm. in simulation, you can fine tune and verify the controller in the processor and hardware algorithm in the fpga at a system level before implementing them on the hardware.

supported hardware platforms

  • xilinx zynq ultrascale rfsoc zcu111 evaluation kit xm500 balun card band pass filter:3000-4300 mhz

design task and system specification

in this example, the design task is to build a wireless communication system for a 5g application and implement the system on a xilinx rfsoc device. the cell search and mib recovery algorithm in this example is the nr cell search and mib recovery algorithm from the (wireless hdl toolbox) example. this figure shows the conceptual overview of the cell search and mib recovery algorithm.

  • the ss block detector and ss block decoder performs all the high-speed signal processing tasks required to detect, demodulate, and decode 5g nr synchronization signal blocks (ssb). this makes these parts well suited for fpga implementation on the programmable logic (pl). to implement the ss block detector and ss block decoder in the pl, this example uses the simulink® hardware models from the nr hdl cell search (wireless hdl toolbox) and nr hdl mib recovery (wireless hdl toolbox) reference examples, respectively.

  • the search controller coordinates the operation of the detector and decoder hardware cores and operates at a low rate, making the search controller well suited for software implementation on the integrated arm® processing system (ps). for the software implementation, this example uses the search controller algorithm described in the (wireless hdl toolbox) example.

system specifications

  • 5g rf carrier frequency: 3560 mhz

  • cell search receive algorithm sample rate: 61.44 msps

design using soc blockset

create an soc model soc_5gnrmibrecovery_top as the top model and set the hardware board to xilinx zynq ultrascale rfsoc zcu111 evaluation kit. this model includes fpga model soc_5gnrmibrecovery_fpga and processor model soc_5gnrmibrecovery_proc, which are instantiated as model references. the top model also includes axi4-stream to software and software to axi4-stream blocks that share the external memory between the fpga and the processor.

open_system('soc_5gnrmibrecovery_top')

close_system('soc_5gnrmibrecovery_top')

create an soc model soc_5gnrmibrecovery_hwtop as the top model for the simulation of a hardware algorithm with a static configuration. this model includes the fpga model soc_5gnrmibrecovery_fpga.

open_system('soc_5gnrmibrecovery_hwtop')

close_system('soc_5gnrmibrecovery_hwtop')

rf data converter configuration

an rfsoc device has its rf data converter connected to the programmable logic. to configure the adc and dac settings, use the rf data converter (rfdc) block. the block provides an interface to the xilinx rf data converter ip in simulink for modeling a wireless system destined for implementation on xilinx rfsoc device.

to meet the system requirements of a 3560 mhz 5g rf carrier frequency and 61.44 msps baseband sample rate, configure the rf data converter block according to these values. nco frequency for the dac and adc mixers is set to 3.560 ghz and the adc and dac sample rate is set to 3932.16 msps, you must choose the values of interpolation mode (xn), decimation mode (xn), and samples per clock cycle parameters such that the effective clock cycle (sample rate) for the wireless algorithm fpga is the desirable value and for this example: 61.44 msps. this is calculated and displayed on the block mask as the stream clock frequency (mhz) parameter after you click apply. set the decimation mode (xn) parameter to 8, then effective sample rate after decimation is 491.52 msps. to get the clock cycle (baseband sample rate) to 61.44 msps, set the samples per clock cycle parameter to 8. similarly, set the interpolation mode (xn) parameter to 8 and the samples per clock cycle parameter to 8 in dac tab. this will imply the stream clock frequency to be 3932.16/(8*8) = 61.44 mhz.

hardware logic design

the fpga model soc_5gnrmibrecovery_fpga contains three subsystems: transmit repeat, vector interpolation (which is connected to the dac portion of the rfdc block), and 5g cell search receive (which is connected to the adc portion of the rfdc block).

open_system('soc_5gnrmibrecovery_fpga')

close_system('soc_5gnrmibrecovery_fpga')

in the 5g cell search receive subsystem, the vector decimator block receives the packed eight samples as 128 bits. the vector decimator block decimates input vector samples by eight and sends to the 5g cell search receive subsystem. the sample rate after the vector decimator is 61.44 msps, as expected by the 5g cell search algorithm for its processing. for the complete design of the 5g cell search and mib recovery algorithm, see the nr hdl cell search (wireless hdl toolbox) and nr hdl mib recovery (wireless hdl toolbox) examples are the model references. the cell search algorithm sends pss reports as a stream data to the search controller running on the processor through a memory.

to provide a test 5g nr waveform, build a transmitter that reads the data samples from block ram and sends it to the dac portion of the rfdc. the data samples are written from the processor using the data path from processing system using the ddr memory. the vector interpolation block interpolates the input samples from the transmit repeat sub system by eight (491.52 msps) and sends as vector of eight samples at a time. all eight samples are packed together as 128 bits axi-stream data and sent to the dac. this figure shows the sample rate flow in the fpga transmit and receive path.

in the receive path, the vector decimator block receives the packed eight samples with a sample rate of 491.52 msps from the rf data converter block. the vector decimator block decimates input vector samples by eight and sends to the cell search receiver. the sample rate after the vector decimator is 61.44 msps as expected by the cell search receiver for its processing. the cell search receiver sends the processed data to processor with sample time of 61.44 mhz. in the transmit path, processor writes 5g test waveform samples to fpga block ram with sample rate of 61.44 msps. the block ram sends the samples continuously to the rf data converter through vector interpolation block by using transmit repeat logic. the vector interpolation block interpolates the input samples by eight (491.52 msps) and sends to the rf data converter block as a vector of eight samples.

processor logic design

the processor logic contains a write task, read task, and periodic task. the periodic task is a timer-driven task with a periodic time of 1e-3 that is defined in the task manager. the periodic task drives the cell search controller block. the cell search controller block configures and controls the hardware algorithm through the axi4-lite registers based on the status received through the axi4-lite read registers and stream read interface. the controller provides the cell search reports to matlab host using udp blocks after valid pss and sss are detected. the udp write pssreport, udp mibreport, and udp write sssreport subsystems relay the pss report, sss report and mib report respectively, to the host over the udp protocol.

the read task is an event-based task driven by the arrival of data from the fpga through ddr memory. this data comprises the information required for generating the pss and sss reports such as cellid and signal-to-noise ratio (snr). the processor algorithm task is denoted as datatask in the task manager block and is specified as an event-driven task. the write task is an event-based task used for transferring test waveform from the processor to the fpga. all the above tasks are modeled under processor algorithm wrapper subsystem in processor model soc_5gnrmibrecovery_proc and connected to the task manager block at the top level.

open_system('soc_5gnrmibrecovery_proc')

close_system('soc_5gnrmibrecovery_proc')

host model

the processor sends pss, sss and mib reports to the host over ethernet using udp write blocks. the ip address of the udp write block in the processor model should be configured to the ip address of the host.

this interface model running on the host shows how to receive the data and reports to the matlab workspace. you can use the rocker switch to select between automatically stopping the model after mib is recovered or to receive indefinitely.

open_system('soc_5gnrmibrecovery_hostudpreceive')

close_system('soc_5gnrmibrecovery_hostudpreceive')

simulate

to confirm basic operation, you can run the hardware model using a generated 5g nr waveform. you can generate a waveform using the nrhdlexamples.generatefr1ssburstwaveform function. the model calls this function in the initialization callback and assigns the waveform to the workspace variable burstwaveform. because the 5g cell search receive subsystem contains a large number of hdl-optimized blocks requiring simulation using sample-based signals running at high sample rates, full simulation can take a while. you can find the simulation of the ss block detector and ss block decoder model references functionalities in the nr hdl cell search (wireless hdl toolbox) and nr hdl mib recovery (wireless hdl toolbox) examples respectively.

you can use this hardware model to quickly simulate and verify the hardware functionality using the test harness. to model the transmit path in the hardware model to loopback with the receiver through the rf data converter block, the test harness uses the generated 5g nr waveform as an input. you can switch between simulating the model in search or demodulation modes by double-clicking the manual switch block. in search mode, the model reaches hardware state 3, which means a pss is detected. the search generates a pss report for each pss detection. these reports are zero-padded to 241 entries and logged to the matlab workspace. in demodulation mode, the model reaches state 8, indicating that the ssb is demodulated and its sss is detected. once the model reaches hardware state 8, the model starts processing mib and provides mib data. the model also returns the zero-padded 241-entry pss report. you can simulate this hardware model for only static configuration.

if you want to see the complete hardware and software simulation of the cell search algorithm and the controller dynamic configuration for multiple frequency searches, run the 5g nr mib recovery top model. to see the detected pss, its demodulation and recovered mib data, this model must run for at least 180 milli seconds. see the simulation data inspector to monitor the hardware and software status signals. the simulation data inspector plots the progress of the cell search algorithm including the start and restart pulses, the frequency offset in hz, and the hardware (ss block detector) state.

pss search operation completed, pss found, demodulation done, and found sss states are clearly visible from the hardware state signal in the above simulation data inspector plots.

to see the pss, sss reports and mib report data in the host, run the host model, and then run the 5g nr mib recovery top model. when the host interface model runs successfully, the model displays the received signal-to-noise ratio (snr) of the pss, sss in db along with the decoded cell id and mib data in separate window. for further processing, the model also exports three timeseries variables to the matlab workspace: sll_pssreport, sl_sssreport and sl_mibreport.

implement and run on hardware

hardware setup

connect the sma connector and band pass filter: 3000-4300 mhz on the xm500 balun card to complete the loopback between the dac and adc, according to these connections.

dac229_t1_ch0(j7) to adc225_t1_ch0(j2).

to implement the model on a supported soc board, use the tool. ensure that the hardware board option is set to xilinx zynq ultrascale rfsoc zcu111 evaluation kit in the system on chip tab of the simulink toolstrip.

to open soc builder, click configure, build, & deploy. after the soc builder tool opens, follow these steps.

  1. on the setup screen, select build model. click next.

  2. on the select build action screen, select build and load for external mode. click next.

  3. on the select project folder screen, specify the project folder. click next.

  4. on the review hardware mapping screen, click next.

  5. on the review memory map screen, to view the memory map, click view/edit. click next.

  6. on the validate model screen, to check the compatibility of the model for implementation, click validate. click next.

  7. on the build model screen, to build the model, click build. an external shell opens when fpga synthesis begins. click next.

  8. on the connect hardware screen, to test the connectivity of the host computer with the soc board, click test connection. to go to the run application screen, click next.

the fpga synthesis often takes more than 30 minutes to complete. to save time, you can use the provided pregenerated bitstream by following these steps.

  • close the external shell to terminate the fpga synthesis.

  • copy the pregenerated bitstream to your project folder by entering this command at the matlab command prompt.

copyfile(fullfile(matlabshared.supportpkg.getsupportpackageroot, ...
 'toolbox','soc','supportpackages','xilinxsoc', ...
 'xilinxsocexamples','bitstreams', ...
 'soc_5gnrmibrecovery_top-xilinxzynqultrascale_rfsoczcu111evaluationkit.bit'),'./soc_prj');
  • load the pregenerated bitstream and run the model on the soc board by clicking load and run.

after the bit file is loaded, open the generated software model.

run the model in external mode by clicking monitor & tune. you can control the configuration from the simulink model.

you can use the simulation data inspector from the software model to monitor the hardware and software. the simulation data inspector plots the progress of the cell search algorithm including the start and restart pulses, the frequency offset in hz, and the hardware (ss block detector) state.

generate pss, sss, and mib reports from hardware

run the host model to see the pss, sss, and mib reports. when the host interface model runs successfully, the model displays the received snr of the pss, sss in db along with the decoded cell id and mib data in separate window. for further processing, the model also exports three timeseries variables to the matlab workspace: sl_pssreport, sl_sssreport and sl_mibreport.

summary

this example shows how to integrate the 5g nr mib recovery algorithm on a xilinx zcu111 evaluation board using soc blockset and then how to verify the design in simulation and on hardware. the implementation recovers, demodulates pss and sss symbols and decodes mib report from 5g nr waveforms.

see also

blocks

  • | | | | | | | | |
网站地图