Turbo Intel® FPGA IP User Guide

ID 683734
Date 4/01/2024
Document Table of Contents

2.6. Simulating the Turbo IP with the C-Model

Before simulating, generate the Turbo IP design example from the IP parameter editor. This task is for simulating a decoder. To simulate an encoder replace dec with enc in any commands.
Table 8.  Turbo C-Model versus Turbo IP Related Parameters
Turbo C-model Turbo IP Value
K Block size K, supports LTE standard -
CW sink_data (input codeword Ncb) -
llr_width Width of the input LLRs supports 5,6,7,8. 8
early_ter Early termination, always set to 1. 1
crc24b CRC_type,
  • 0: CRC24A
  • 1: CRC24B
max_subiter sink_max_iter supports up to 31 (5 bits). -
nb_eng Number of Processors supports 2, 4, 8, 16, 32. 16
Iter_used source_iter Output
crc_pass CRC_pass Output
decoded_bits source_data_s Output
  1. Compile the C code of the decoder from <Example Design Folder>\c\ directory.
  2. For GCC compiler from terminal on Linux, type:
    >> gcc -lm main_lte_dec.c -o run_dec (for LTE)
    >> gcc -lm main_umts_dec.c -o run_dec (for UMTS)
    >> ./run_dec
  3. For GCC compiler (e.g. MinGW-w64) from a command prompt on Windows, type:
    >> gcc -lm main_lte_dec.c -o run_dec (for LTE)
    >> gcc -lm main_umts_dec.c -o run_dec (for UMTS)
    >> ./run_dec.exe
  4. For Visual Studio on Windows:
    1. Create an empty VS project in <Example Design Folder> directory
    2. Add the single source file main_lte_dec.c or main_umts_dec.c to the project
    3. Build and run the project
  • The executable reads ../test_data/ctc_input_data.txt and ../test_data/ctc_input_info.txt as inputs for the decoder (../test_data/ctc_encoder_input.txt and ../test_data/ctc_encoder_input_info.txt for the encoder).
  • The executable generates ../test_data/ctc_decoded__output_data_gold.txt and ../test_data/ctc_output_et_info_gold.txt as outputs for the decoder (../test_data/ctc_encoder_output_gold.txt for the encoder).
  • You can use the same input .txt files in RTL simulations.
  • The output .txt file provides a golden output, which you can use to check the correctness of the output from RTL simulations.
  • You can create a VS project at a different location. You must move the test_data folder to <vs project>/../test_data directory to avoid the error cannot open .txt file.
Figure 6. Design Example