Forum Discussion

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

Nios2 gen2 interrupts getting disabled

I have just ported a project that's been working for years with a Nios2-gen1 processor to the new Nios2-gen2. Everything seems to be working fine except for one strange problem, I'm finding my interrupts are getting spontaneously disabled for some reason.

In debugging this, I've found that occasionally when an interrupt occurs (from the internal interrupt controller) the estatus register is zero. estatus should have a copy of the status register at the time of the interrupt, and since the interrupt can't occur if bit 0 of the status register is clear, then I would never expect estatus to be zero on entry to an interrupt.

I've checked the exception register and it indicates that the cause of the interrupt is the IIC, so it's definitely a hardware interrupt causing the exception.

Does anyone know if this is a known errata on the Nios2-gen2 processor?

For the moment I'm just forcing estatus to 1 in my interrupt handler, but I'd love to know what the root cause of this issue is.

Thanks,

Steve

14 Replies

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

    --- Quote Start ---

    Hi maurimj,

    your issue happen in nios II or the gen 2 nios?

    --- Quote End ---

    Nios II Gen 2. We also submitted an Altera SR. Their reply was to use the IRQ bridge. I am surprised they did not recommend the patch that they gave you as I am sure it is a related issue.

    It was an interesting problem and I am not sure how or why the IRQ bridge fixed the issue. I could go into debug mode and step over lines where I would write to the control registers (status, ienable, etc.). None of them would "accept" their writes.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I think it's just a bug in the Nios2 processor generator shipped with Quartus 15.0. It seems to have something to do with the tightly coupled data master port.

    Altera support was able to quickly provide a patch when I put in my service request, so they appear to know about it. I asked for a list of know bugs in the Nios processor, but they were not able/willing to provide one.

    Quartus 15.1 has now been released, so I would expect that this bug has now been fixed in the software.

    --- Quote End ---

    Would be possible to get a patch from you or link to the Altera web site?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The file that Altera support sent me is attached.

    Unzip it and replace the file of the same name from the Quartus 15.0 install.

    Note that I believe this is fixed in 15.1, so you should only need the patch if you're still using the older version.

    - Steve