Visible to Intel only — GUID: bnz1601375658928
Ixiasoft
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.
- Compile the C code from the <Design Example Directory>\c_model\ directory.
- For GCC compiler from terminal on Linux:
- For polar encoder or decoder type:
>> gcc -lm polar5g_codec_tb.c>> ./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 1This test case runs list size = 4, code block length = 64, CRC = CRC16, and the interleaver is on. - For downlink polar encoder with bit allocation type:
>> gcc -lm polar5g_enc_ba_dl_tb.c>> a.out
- For uplink polar decoder with bit allocation type:
>> gcc -lm polar5g_dec_ba_ul_tb.c>> a.out
- For polar encoder or decoder type:
- For GCC compiler (e.g. MinGW-w64) from Command Prompt on Windows type:
>> gcc -lm polar5g_codec_tb.c (Encoder or Decoder)>> gcc -lm polar5g_enc_ba_dl_tb.c (Enocder with bit allocation)>> gcc -lm polar5g_dec_ba_ul_tb.c (Decoder with bit allocation)>> a.exe
- For Visual Studio on Windows:
- Create an empty VS project in <Design Example Directory> directoy
- Add a single source file polar5g_codec_tb.c, polar5g_enc_ba_dl_tb.c or polar5g_dec_ba_ul_tb.c to the project
- Build and run the project.
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.