Issue with reading bitstream files

Hello, I seem to have some issue reading a bit file generated from my Vivado project. There does not seem to be a problem when I upload the bit file through FrontPanel and onto my XEM7310 board (though I don’t think the bit file is performing as intended). But when I tried to upload the bit file through ConfigureFPGA from okCFrontPanel (Python API), an error code of -7 (which means the file can not be opened) is read. What is causing the difference? What could be causing Vivado to produce an erroneous bitstream file?

Hello!

Could you please post the relevant code and the location of the file to confirm? The issue is likely not Vivado, but the user code pointing to the bitfile’s location. As the error code states, the file can’t be opened with the given path, for whatever reason that may be.

Sure, the bit file is in the same folder as the python code:

And here are the python and bit files used:
py_bit_files.zip (55.5 KB)
Thanks!

This looks fine, but the Python script needs to be ran in the directory it is contained in. For example:

py .\py_bit_files\transfer_test.py
1
-7 # Not found 
py .\transfer_test.py
1
0 # all good

Alternatively, use an absolute path for the file name instead of a relative path.