These are chat archives for VUnit/vunit

Oct 2020
Ahmad Zaklouta
Oct 05 2020 09:29 UTC


@Ahmad-Zaklouta Are the prints due to reading uninitialized memory?

No, it is all the calibration process and refreshing.

I'm getting ERROR - failed to preprocess ~/..../bi_fsm.vhdl
Is it possible to know where or what is the error exactly?
Oct 05 2020 13:43 UTC
Look for log or one of the other logging VUnit method names in that file (e.g. info, warning, etc). If it is the VHDL ‘log’ function, you can exempt that from preprocessing in the python API
To be clear, that error looks to me like the preprocessor parser is failing because it’s adding arguments to a function that is not a VUnit function
Oct 05 2020 13:50 UTC
It’s been a while since I’ve run into preprocessor errors so I don’t remember if python fails or if there are overloading errors. If the above isn’t it, you can search the python code for that specific error to see what it’s doing, post some code, or comment things until you get the error to go away to see what’s causing it
Ahmad Zaklouta
Oct 05 2020 14:06 UTC
@GlenNicholls I went through all info and check function and nothing seems to be wrong.
I am getting this code error:
  File "C:\Python38\lib\site-packages\vunit_hdl-4.4.1rc0-py3.8.egg\vunit\ui\", line 651, in _preprocess
    code =, fname)
  File "C:\Python38\lib\site-packages\vunit_hdl-4.4.1rc0-py3.8.egg\vunit\", line 161, in run
    code[match.start("args") + closing_paranthesis_start + 1 :]
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
Oct 05 2020 14:49 UTC
Can you post the python code?
Ahmad Zaklouta
Oct 05 2020 14:53 UTC
Oct 05 2020 14:55 UTC
Yes, the run file
or wherever you're calling enable_preprocessing()
Ahmad Zaklouta
Oct 05 2020 14:59 UTC
@GlenNicholls here is my run. I have been using it for many other files without any issue. in my code there are only (check_true, check_false, check_equal, and info)
from pathlib import Path
from vunit import VUnit
from vivado_util import add_vivado_ip

#Xilinx Lib
XILINX_LIB = "C:/xilinx_libs"

ROOT = Path(__file__).resolve().parent

#Sources path for DUT
DUT_PATH = ROOT / "design"

#Sources path for TB
TEST_PATH = ROOT / "testbenches"

VU = VUnit.from_argv()

# add xilinx_libs
VU.add_external_library("unisims_ver", str(Path(XILINX_LIB) / "unisims_ver"))
VU.add_external_library("unifast_ver", str(Path(XILINX_LIB) / "unifast_ver"))
VU.add_external_library("unimacro_ver", str(Path(XILINX_LIB) / "unimacro_ver"))
VU.add_external_library("simprims_ver", str(Path(XILINX_LIB) / "simprims_ver"))
VU.add_external_library("unisim", str(Path(XILINX_LIB) / "unisim"))
VU.add_external_library("unimacro", str(Path(XILINX_LIB) / "unimacro"))
VU.add_external_library("unifast", str(Path(XILINX_LIB) / "unifast"))
VU.add_external_library("secureip", str(Path(XILINX_LIB) / "secureip"))

# add design library
design_lib = VU.add_library("bitidentify_lib")
# add design source files
design_lib.add_source_files([DUT_PATH / "*.vhdl"])
design_lib.add_source_files([DUT_PATH / "*.sv"]) 

# add testbench library
tb_lib = VU.add_library("tb_lib")
# add testbench source files
tb_lib.add_source_files([TEST_PATH / "*.vhdl"])

    output_path = ROOT / "project_ip" / "vivado_libs",
    project_file = ROOT / "project_ip" / "managed_ip_project" / "managed_ip_project.xpr",

VU.set_sim_option("modelsim.vsim_flags", ["-novopt", "+notimingchecks", "tb_lib.glbl"])
for tb in tb_lib.get_test_benches():
  tb.set_sim_option("modelsim.init_file.gui", str(ROOT) + "/waves/" + + "")

Oct 05 2020 17:37 UTC
Hmmm, I don't see anything funky in your run script, so enable_location_preprocessing() is failing on something in the file you called out above (bi_fsm.vhdl). Are you able to share this code? It looks like the parenthesis for something in that file is causing preprocessing to fail. If you can't share that file, comment everything in the arch body and start uncommenting things until it breaks and this should point you to the failing line(s).