Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

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

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

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

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

    Regards,

    Maik