Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21611 Discussions

How to access fpgamgrregs/gpi registerfrom FPGA fabric?!?

Altera_Forum
Honored Contributor II
1,495 Views

Hi, 

 

I'm lookin for a failsafe way to read a system ID from the HPS (-> OS = Linux) even if there is nor configuration in the FPGA. my latest idea is to use the gpi register of the FPGA manager, but I don't know how to access it from the FPGA fabric. Any hints? 

 

You might ask yourself: Why am I doing this? Why am I not using the System ID component of QSys? Well, what if I design a QSys system that has a System ID componenat on the say LWHPS2FPGA Bridge at address 0x0. Let's say, I forget to configure the FPGA with that system (or something goes seriously wrong during configuration of the FPGA). Now, If I try to access address 0x0 from the Linux OS either with mmap() or ioread32(), and there is no System ID component on that address, I already observed that both the mmap() and ioread32() calls block the whole system so that I'm forced to reboot the linux system. 

I imagine that if I write a defined value (my system ID) to the gpi register of the FPGA manager, that would be easy to read out by my Linux system and I can easily determine if the expected design is loaded into the FPGA. If not, then the Linux system can continue to work and it can react in some way to that fault. 

 

So how do I write to that gpi register from the FPGA fabric? 

 

Thanks, 

Maik
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
751 Views

Hi, 

 

I have submitted a SR and got the attached screenshot for my question. That's how it is done . . .  

 

Regards, 

Maik
0 Kudos
Reply