A newer version of this document is available. Customers should click here to go to the newest version.
3.5. Simulating the 5G Polar IP with the C-model
 Verify that the RTL behaves the same as these models. 
  
 
  
   Before simulating, generate a 5G Polar design example. 
  
 
  - Go to the c_model\ directory.
-  Compile the C code. 
    >> gcc -lm polar5g_codec_tb.c
-  Run the executable. 
    >> ./a.out <list_size> <len_type> <crc_type> <il_on>where: - list_size corresponds to the compile-time parameter NUM_LIST in the RTL
- len_type corresponds to the param_len input in the RTL
- crc_type corresponds to the param_crc input in the RTL
- il_on corresponds to the param_il input in the RTL
 For example, >> ./a out(4, 2, 4, 1);This test case runs list size = 4, code block length = 64, CRC = CRC16, and the interleaver is on.The test function generates polar5g_codec_params.txt, polar5g_enc_in.txt, polar5g_enc_out.txt, polar5g_dec_in.txt, and polar5g_dec_out.txt, which you may use in RTL simulation as inputs or as reference outputs.The simulation runs both the encoder and the decoder functions, even if you generate only an encoder or a decoder.