5G LDPC-V Intel® FPGA IP User Guide

ID 683670
Date 3/30/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

3.3. Simulating the 5G LDPC-V IP

Verify that the RTL behaves the same as these models.
Before simulating, generate a 5G LDPC-V design example.
  1. Simulate the transmitter with the C-model:
    1. Go to the c_model\ directory.
    2. Compile the C code of the transmitter chain.
      >> gcc -lm ldpc5g_tx_chain_test.c -o run_tx
    3. Run the executable.
      The C program takes three arguments, where the first is the starting test case index, second is the number of test cases, and the third is enabling or disenabling HARQ. For example, the command run_tx 10 15 1 generates test cases from the 10th to the 25th with HARQ enabled.
      The executable generates tx_param.txt tx_in.txt, and tx_out.txt.
  2. Simulate the receiver with the C-model (always simulate the transmitter before you simulate the receiver and with the same arguments):
    1. Go to the c_model\ directory.
    2. Compile the C code of the receiver chain.
      >> g++ -lm ldpc5g_rx_chain_test.cpp -o run_rx
    3. Run the executable.
      The C program takes three arguments, where the first is the starting test case index, second is the number of test cases, and the third is enabling or disenabling HARQ. For example, the command run_rx 10 15 1 generates test cases from the 10th to the 25th with HARQ enabled.

      The executable takes tx_out.txt and generates rx_in.txt, rx_param.txt, and rx_out.txt.

  3. Simulate with the VCS simulator:
    1. Modify these files, if you want to see the waveform of the top level design:
      • For the transmitter, in <Example Design Directory>\src\ldpcv5g_tx_top_tb.sv uncomment the following lines:
        • // Dump waveform, may not work with your simulator
        • $vcdplusfile("./tx.vpd");
        • $vcdplusmemon();
        • $vcdpluson();
      • For the receiver, in <Example Design Directory>\src\ldpcv5g_rx_top_tb.sv uncomment the following lines:
        • // Dump waveform, may not work with your simulator
        • $vcdplusfile("./rx.vpd");
        • $vcdplusmemon();
        • $vcdpluson();
      • In <Example Design Directory>\simulation_scripts\synopsys\vcs\vcs_setup.sh, modify USER_DEFINED_ELAB_OPTIONS="-debug_access+r"
    2. Run vcs_setup.sh from <Example Design Directory>\simulation_scripts\synopsys\vcs\.
      >> source vcs_setup.sh 
      >> simv
      For other simulators (Aldec, Cadence, Mentor or Synopsys), run the script from the corresponding simulator directory in <Example Design Directory>\simulation_scripts\.
  4. Simulate 5G LDPC-V IP with the MATLAB model:
    1. In MATLAB, run make.m from the \matlab\ directory.
      >> make
      MATLAB generates MEX.
    2. Check if p_mat/ exists in matlab/, if not, copy it from ../c_model/p_mat/ in the /matlab/ directory.
    3. Run ldpc5g_txrx_chain_test.m, which is an example testbench to call the transmitter MATLAB function (ldpc5g_tx_chain.m) and receiver MATLAB function (ldpc5g_rx_chain.m).
      >> ldpc5g_txrx_chain_test