cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
anm
Adventurer
Adventurer
6,968 Views
Registered: ‎02-18-2015

External Interrupt for Microblaze from custom IP - AXI / XPS Interrupt Controller

Jump to solution

Aloha to the Community!

I have a side project for my Thesis that involves the implementation (in a Spartan 6 FPGA) of a Microblaze connected with a custom Interface (IP) I have made, using the AXI-Lite protocol. For 2 days I have been reading various posts written in the Forum about Microblaze and Interrupts:

but still many questions arise.

First of all, a brief sum up of what I am trying to achieve.
I have made a project with a single Microblaze and then I have Created and Imported my IP (Intellectual property). My IP is connected as Slave to the Microblaze. The board that I am using is a "custom" Board, with 2 Spartan 6 FPGAs on it, connected through physical paths (pin to pin connection). The Microbalze with my IP will be implemented in Spartan 6 (A) and will communicate throught the physical paths with the other Spartan 6 (B).
From the Spartan 6 B, there will be a pin that will deliver a 1 bit signal to Spartan 6 A. When this signal goes high (for 1 clock cycle), I want an Interrupt to happen at the Microblaze and  the C programm written at the Interrupt Service Routine to be executed.

Now, from what I have read at the "Microblaze Reference Guide - EDK 14.7":


MicroBlaze supports one external interrupt source (connected to the Interrupt input port). The processor only reacts to interrupts if the Interrupt Enable (IE) bit in the Machine Status Register (MSR) is set to 1. On an interrupt, the instruction in the execution stage completes while the instruction in the decode stage is replaced by a branch to the interrupt vector. This is either address C_BASE_VECTORS + 0x10, or with low-latency interrupt mode, the address supplied by the Interrupt Controller.

So from what I understand the Microblaze has a dedicated Interrupt Port. In order to connect my Signal from Spartan 6 B to the Interrupt Port of the Microbalze, I see the following ways:

a) Connecting the Interrupt Port of the Microblaze directly with the pin of the Spartan 6 A that accepts the signal from Spartan 6 B.

b) Passing the signal through my Interface (IP) and then extracting it from a Port that I will be directly connected to the Interupr Port of the mb. If this is the case, should the port of the IP be made "External" or "Output" at the tab "Ports" of my project?

c) Connecting an Interrupt Controller to the Interrupt Port of the mb and then passing the signal to the Interrupt Controller with one of the above ways (directly from the FPGA A pin or from a Port through my IP interface).


Currently I am interested for only one interrupt source. Is it obligatiory for even 1 interrupt source, to connect the Interrupt signal  first to an Interrupt Controller and then the Interrupt Controller to the Interrupt Port of the Microblaze?
As for the Interrupt Controller, I see that I can add either the "XPS Interrupt Controller" or the "AXI interrupt Controller". Which one should I add? Is their only difference the protocol used for their connection to the Microblaze (XPS uses PLB and AXI uses AXI)?

When this questions are clarified, I will post further information about the more technical details of my project.
Thank you in advance for your help!

Nassos

0 Kudos
1 Solution

Accepted Solutions
anm
Adventurer
Adventurer
6,809 Views
Registered: ‎02-18-2015

It seems that I have managed to connect the dvld_out output of my IP to the Input of the AXI GPIO (strange that XPS didn't show me, the previous days, the pop-up window that enables you to connect various outputs to the Input of the AXI GPIO). Furthermore, I inserted the IP2INTC_Irpt of the AXI GPIO to the Intrerrupt ipnut (Intr) of the AXI Interrupt Controller. I hope that does the trick (of the external interrupt to the Microblaze) now.

View solution in original post

pic_1.PNG
0 Kudos
6 Replies
anm
Adventurer
Adventurer
6,923 Views
Registered: ‎02-18-2015
No one knows if the Interupt Port of Microblaze always needs an Interrupt Controller to work, even with only one interrupt source?
0 Kudos
goran
Xilinx Employee
Xilinx Employee
6,910 Views
Registered: ‎08-06-2007

Hi,

 

It does work but you will need to comply with the requirements on this port.

It is far easier to just use the interrupt controller (XPS or AXI depending on what bus interface you have picked PLB/AXI).

 

I suggest reading the MicroBlaze Reference Guide for more information about the interrupt handling with MicroBlaze.

 

Göran

anm
Adventurer
Adventurer
6,902 Views
Registered: ‎02-18-2015

Hi goran and thank you for your reply!

I have passed the signal I wanted from Spartan 6 B, to my Interface (IP) that is implemented in Spartan 6 A. I am extracting this signal from my IP, from a port I named dvld_out. I also connected an AXI-Interrupt Controller to my Microblaze.

Under the tab "Ports" I have made "dvld_out" port an external port. Under the "External Ports" option in the same tab, I have made "dvld_out" Class = INTERRUPT.

I went to the AXI Interrupt Controller option, but the signal Intr still gives me only the interrupts: Interrupt (debug_module), ECC_interrupt and ECC_UE (from axi_bram_ctrl component). I doesn't give me the option to connect my dvld_out. I presume that I have to connect dvld_out in my AXI bus in order for it to be a visible option for Intr of AXI Interrupt Controller. How do I do that?

Thank you in advance for your help!

0 Kudos
anm
Adventurer
Adventurer
6,893 Views
Registered: ‎02-18-2015

It seems that an "AXI General Purpose IO" component can solve the problem of connecting my dvld_out signal to my AXI Interrupt Controller. I  have added an "AXI General Purpose IO" component in my microblaze. This component can be connected to my Interrupt Controller. So now I have 2 options:

a) Connecting somehow my external port "dvld_out" to the input of my "AXI General Purpose IO".

b) Making the input of "AXI General Purpose IO" an external port and connecting to that port the "dvld_out" signal from the pin of my Spartan 6 A.

Which one of the 2 options is implementable? I am trying to do the 1st, but I can't seem to find a way to connect "dvld_out" external port to the input of the "AXI General Purpose IO" component.

Tags (2)
0 Kudos
anm
Adventurer
Adventurer
6,861 Views
Registered: ‎02-18-2015

I want to connect my "dvld_out" port to the "AXI General Purpose IO". I have read the ds744_axi_gpio product specification pdf, but I still can't find a way to connect my port to the Ipnut of the AXI GPIO. Anyone familiar with how to do it?

Thank you in advance for your help.

Tags (2)
0 Kudos
anm
Adventurer
Adventurer
6,810 Views
Registered: ‎02-18-2015

It seems that I have managed to connect the dvld_out output of my IP to the Input of the AXI GPIO (strange that XPS didn't show me, the previous days, the pop-up window that enables you to connect various outputs to the Input of the AXI GPIO). Furthermore, I inserted the IP2INTC_Irpt of the AXI GPIO to the Intrerrupt ipnut (Intr) of the AXI Interrupt Controller. I hope that does the trick (of the external interrupt to the Microblaze) now.

View solution in original post

pic_1.PNG
0 Kudos