cocotb: Intermittent simulator crash from UnicodeDecodeError

I am seeing an intermittent error at simulator start up when using xcellium

xrun(64): 18.03-s006: (c) Copyright 1995-2018 Cadence Design Systems, Inc.
Loading snapshot worklib.aes_gcm_top:sv .................... Done
xmsim: *W,DSEM2009: This SystemVerilog design is simulated as per IEEE 1800-2009 SystemVerilog simulation semantics. Use -disable_sem2009 option for turning off SV 2009 simulation semantics.
     -.--ns INFO     cocotb.gpi                                  gpi_embed.c:78   in set_program_name_in_venv        Did not detect Python virtual environment. Using system-wide Python interpreter
     -.--ns INFO     cocotb.gpi                                GpiCommon.cpp:104  in gpi_print_registered_impl       VPI registered
xcelium> source /cad/adi/apps/cadence/xlm/linux/18.03-s06/tools.lnx86/inca/files/xmsimrc
xcelium> run
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: invalid continuation byte
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 47-48: invalid continuation byte
     0.00ns ERROR    cocotb.gpi                                gpi_logging.c:224  in gpi_log                         Error calling Python logging function from C

Attaching the simulator log if it is any help.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (13 by maintainers)

Most upvoted comments

This is the print output:

['xrun', '-timescale', '1ns/1ps', '-f', '`ܓ\x03', '-licqueue', '-64', '-xmlibdirpath', 'sim_build', '-plinowarn', '-top', 'smp_dut_top', '-loadvpi', '/tmp/smp_dut/tests/build/libs/x86_64/libvpi', '-access', '+rwc', '-createdebugdb']

Yes I am good with solution and okay to close. Any idea when the next release will be out with this fix.

This is the result from master:

xmsim: *W,DSEM2009: This SystemVerilog design is simulated as per IEEE 1800-2009 SystemVerilog simulation semantics. Use -disable_sem2009 option for turning off SV 2009 simulation semantics.
     -.--ns INFO     cocotb.gpi                                  gpi_embed.c:79   in set_program_name_in_venv        Did not detect Python virtual environment. Using system-wide Python interpreter
     -.--ns INFO     cocotb.gpi                                GpiCommon.cpp:104  in gpi_print_registered_impl       VPI registered
xcelium> source /cad/adi/apps/cadence/xlm/linux/18.03-s06/tools.lnx86/inca/files/xmsimrc
xcelium> run
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 0: invalid continuation byte
     -.--ns ERROR    cocotb.gpi                                  gpi_embed.c:321  in embed_sim_init                  Unable to create Python string from argv[0] = ""
     -.--ns ERROR    cocotb.gpi                                gpi_logging.c:244  in gpi_log_v                       Error calling Python logging function from C while logging the above
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 47: invalid continuation byte
# check that the file was actually created, since we can't set an exit code from cocotb
test -f results.xml
make[1]: *** [results.xml] Error 1