Closed weikongwei closed 2 months ago
That might be a problem of the debugger. The C++ support of debuggers is not always great. Try a cout or printf that should work better.
That might be a problem of the debugger. The C++ support of debuggers is not always great. Try a cout or printf that should work better.
Thanks a lot! It is readable when using std::cout. The problem is the debugger indeed.
I'm have added code in bbaexport.py to write clock region data to the .bba file, and thereafter, it is converted into .bin file. Then, it can be loaded as memory-mapped-file in Nextpnr. However, when I try to debug NextPNR, i'm not able to access clock region data by using [] operator defined in struct RelPtr. The compiler tells me "Could not find operator []."
I have verified the offest added to chip_info, no issues found. I also modified the chipdb.hexpat file to visulize .bin file in ImHex. No ssues found, all data seems correct. When I modified the .hexpat file, I realized that nextpnr may not have the knowledge to map clock region data from .bin to the struct ClockRegionDataPOD defined in NextPNR. So far, no clue to complete this mapping.
When writing .bba file,
bba.ref("clock_regions")
is added to clock_regions to refer back to the head location of the clock region data like shown below.bbaexport.py:
xilinx/arch.h:
Chip_info shown in ImHex:
Debug NextPNR