Forum Discussion
Accessing code on a Max10 FPGA
We have an Altera Max 10 FPGA chip on one of our circuit boards. We are able to push code to it using bash script but I have no idea how to perform the following functions now that the code is on the fpga:
1. Connect - Connect to the FPGA and confirm that the connection was established
2. Disconnect - Disconnect from the FPGA and confirm that the connection was terminated
3. Read - Read data from the FPGA
4. Write - Write data to the FPGA
5. Run - Run to code on the FPGA
6. Stop - Stop the code running on the FPGA
7. Version - Read back the version of the code on the FPGA
In the past we were able to access these functions via the fs2nios.dll, but since the move to the usb blaster I've been unable to find any documentation on the usbblaster.dll to replicate our old methods of accessing the code on the FPGA.
Are these commands available in Quartus 18.1? If so can they be automated using tcl scripts? Is there another recommended software for accessing data from the FPGA after the code has been compiled to it?
14 Replies
- FakhrulA_altera
Regular Contributor
Hi AustinTatious,
Can we have a short meeting via Teams?
We will discuss this further there and I will send you the invitation to your email.
Regards,
Fakhrul
- FvM
Super Contributor
Thanks for the explanation. So you expect that these functions should be working with the genuine Quartus system console. Unfortunately I'm not working with SOPC Builder, but there should be a documentation.
- AustinTatious
New Contributor
I'm aware that FS2 is no longer in business and that the associated software does not work on newer computers. What I'm attempting to do is replicate the functionality of the old code using the most recent methodology. We have tcl code that uses the system-console.exe to perform the actions needed but my current problem is that those methods use the master_write_32, master_read_32 functions pretty extensively. The arguments are "service-path", "address", and "values". The service paths were being populated by the "get_service_paths master" command, but currently when the device is plugged in we see the devices in "get_service_paths devices" but nothing when we try "get_service_paths master" which causes none of our functions to work. I'm trying to debug why my master service paths are populating. I have access to the .pof and .sof files but nothing else, and I'm trying to figure out what to ask for from our development team and when I get it where to check to ensure that the master services are initiated.
- FvM
Super Contributor
I'm under the impression that your problems are mainly related to missing function of the FS2 third party tools. This might be a problem of newer Windows or incompatibility with recent Quartus versions. First Silicon Solutions seems to have stopped this business since many years, in so far I'm not sure what Intel support can do about it.
- AustinTatious
New Contributor
No I don't want to close this ticket yet. My master service still isn't functioning and its the core of my code's functionality. I have the .pof and .sof files but I'm not sure how to debug why this master service isn't functioning. Is it possible to debug it with just these files or do I need the project file? Does the master service need to be instantiated correctly before those files are compiled or is there a way to initialize it from the tcl console?
- FakhrulA_altera
Regular Contributor
Hi AustinTatious,
I wish to follow up with you about this case.
Do you have any further questions on this matter?
Else I would like to have your permission to close this forum ticket.
Regards,
Fakhrul
- AustinTatious
New Contributor
The library and common tcl files I've been given to work with use the master_write_32, master_read_32 functions pretty extensively. The arguments are "service-path", "address", and "values". The service paths were being populated by the "get_service_paths master" command so at least according to the way the existing code architecture is written it seems pretty important.
Our goal isn't to reprogram or blank the device, but to communicate with it once it has already been programmed using read and write functions. All of our existing code revolves around communicating with the fpga using these master write and read functions. I was trying to not throw the figurative baby out with the bath water because I've been having issues getting their code to work, but if there are other read/write methods I'm not considering that don't rely on the master service path then I'm all ears.
- ak6dn
Regular Contributor
No, the .pof and/or .sof files are used to program the device image, and thus define the complete functionality of the target device.
The basic JTAG interface is defined in hardware (that is how you can access and program a blank device) but the programmed image can add features.
Based on prior comments, I don't see how "get_service_paths master" could return anything other than basic info about an unprogrammed device.
You should be able to (re-)program a (possibly blank) device just using command line tools.
Using "get_service_paths master" before a device is programmed does not seem to be a valid operation to me.
- AustinTatious
New Contributor
We are using a Windows environment and using the Quartus system-console to run tcl scripts written by our development department. There are .pof and .sof files that we've used to configure the FPGA, but the script relies on the "get_service_paths master" command to populate the global variables used to connect to the fpga, yet the command returns no master service paths. The device service paths show up just fine so we know the jtag connection between the computer and the fpga is functioning, but not the master ones. From my understanding the .pof and .sof files are just used to configure the jtag connection, not to set up services but I could be mistaken. We're not sure how to debug why the master services are appearing when we use the "get_service_paths" proceedure is used. Any assistance would be appreciated.
- Farabi_Altera
Regular Contributor
Hello,
I guess you are using Linux environment to run the FPGA programming/configuration.
If you are using USB Blaster II programming cable to program/config the FPGA over JTAG connector/protocol, it is an easy task.
You can use Quartus Programmer tool to program/config the FPGA from your laptop.
User guide : https://www.intel.com/content/www/us/en/docs/programmable/683039/21-3/programmer-user-guide.html
Is this what you looking for?
regards,
Farabi