Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to prevent FPGA devindex from changing? #43

Open
lingdianvision opened this issue Aug 18, 2024 · 3 comments
Open

How to prevent FPGA devindex from changing? #43

lingdianvision opened this issue Aug 18, 2024 · 3 comments

Comments

@lingdianvision
Copy link

I have four FPGA devices on one PC and I realized that devindex is not constant. devindex=0 for the FPGA on PC A. Next time I turn on the PC, I may need devindex=1 to properly turn on the FPGA on PC A. How can I solve this problem? Is there any way to determine what the devindex is on PC A?

@ufrisk
Copy link
Owner

ufrisk commented Aug 21, 2024

Currently there is no good way. I mean you can probably start MemProcFS and read the computer name via the API from \sys\computername.txt (https://github.com/ufrisk/MemProcFS/wiki/FS_SysInfo) but that solution isn't very nice.

The FTDI supports addressing via serial number as well, but I haven't added it so I'd have to add it to make it more stable I guess.

Please let me know if the reading of the computer name would be sufficient. If it's the wrong computer you could shut down and read from the other device...

@lingdianvision
Copy link
Author

Thank you very much for your reply. Your plan can solve my problem. But I still need to write a part of the code to implement.
I hope that in the future, a PCNAME parameter can be added to the VMM.DLL Initialize function, which can be correctly connected to the correct FPGA device each time.
"-Device", "fpga: // pcname = pc_001"
"-Device", "fpga: // pcname = pc_002"
...........

@lingdianvision
Copy link
Author

I also found a problem where, when opening devices with devindex=0 and devindex=1, if the computer that the device devindex=0 is on is shut down or loses power, the VMM_HANDLE obtained by opening the device devindex=1 will become invalid and no longer work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants