UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer ali_gh70
Observer
650 Views
Registered: ‎07-20-2018

how to use microblaze interrupt sdk for costum peripheral

Jump to solution

hello every body.

i made a costume peripheral in edk and in it's setting i enabled interrupt for an specific pin.now i imported my output prj to sdk .

i wanna now how i have to use interrupt in sdk .

tnx

0 Kudos
1 Solution

Accepted Solutions
Observer ali_gh70
Observer
605 Views
Registered: ‎07-20-2018

Re: how to use microblaze interrupt sdk for costum peripheral

Jump to solution

hello everybody 

eventually i found the answer .

let us have a complete description .

imagine we have made a costume peripheral that it's name is TIMER .it has a pin that we call it interrupt .

now we add axi interrupt controller to our design .when we double click on it .we see something like this 

1.pngu can see that there is nothing in above image.

the point is that xps dose not know that ur interrupt pin is really interrupt so we have to tell xps that out interrupt pin is really and interrupt 

but how ?

take a look at this picture

2.png

3.png

so we add this line to our TOP of mhs file

 PORT interrupt = interrupt, SIGIS = INTERRUPT, SENSITIVITY = EDGE_RISING, DIR = I

the xps asks u to overwrite the file and u should click on yes 

when u wanna close mhs file xps says something but u should click NO in order to keep changes

now we go to int_c another time 

we see that now xps know our interrupt pin

4.png

we are done 

just click on export 

my references

How can I add external interrupts

how to write to mhs file

psf_rm(platform specification format reference manual

 

0 Kudos
5 Replies
Voyager
Voyager
606 Views
Registered: ‎03-28-2016

Re: how to use microblaze interrupt sdk for costum peripheral

Jump to solution

A good place to start is looking at the example code provided for the Interrupt Controller that you instantiated in your hardware design.  To find the example code, open your SDK project.  Open the Board Support Package (BSP) folder that you created.  Select the "system.mss" file and open it in SDK.  That file will list the peripherals that are included in the project.  One of the peripherals should be the "axi_intc".  Next to it should be a hyper-link for "Examples".  Select this link and it should show you the available examples for the INTC pcore.

 

 

Ted Booth - Tech. Lead FPGA Design Engineer
www.designlinxhs.com
Xilinx Employee
Xilinx Employee
597 Views
Registered: ‎06-02-2017

回复: how to use microblaze interrupt sdk for costum peripheral

Jump to solution

Hi ali_gh70,

 

From hardware perspective, you need add an axi_intc into block design, and connect the "interrupt" port to the micorblaze.

Then connect the interrupt signals of each modules to the "intr" port of axi_intc via concat(if more than one intr source).

 

From software perspective, you can take the example project as reference. Most Peripherals has the intr example source code in the SDK.

-------------------------------------------------------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
--------------------------------------------------------------------------------------------------------------------------------------------
Observer ali_gh70
Observer
556 Views
Registered: ‎07-20-2018

Re: how to use microblaze interrupt sdk for costum peripheral

Jump to solution
@zhiq
hello
i wanna make my pin to works as a interrupt . i also have seen how int_c and it’s library works but i dont know where i have to choose my port class to interrupt .
i saw interrupt option in plb64
but i dont know where can i find interrupt option for axi4-lite
i mean the class of my port in edk is not INTERRUPT so i cannt connect it to int_c
thanks
0 Kudos
Observer ali_gh70
Observer
606 Views
Registered: ‎07-20-2018

Re: how to use microblaze interrupt sdk for costum peripheral

Jump to solution

hello everybody 

eventually i found the answer .

let us have a complete description .

imagine we have made a costume peripheral that it's name is TIMER .it has a pin that we call it interrupt .

now we add axi interrupt controller to our design .when we double click on it .we see something like this 

1.pngu can see that there is nothing in above image.

the point is that xps dose not know that ur interrupt pin is really interrupt so we have to tell xps that out interrupt pin is really and interrupt 

but how ?

take a look at this picture

2.png

3.png

so we add this line to our TOP of mhs file

 PORT interrupt = interrupt, SIGIS = INTERRUPT, SENSITIVITY = EDGE_RISING, DIR = I

the xps asks u to overwrite the file and u should click on yes 

when u wanna close mhs file xps says something but u should click NO in order to keep changes

now we go to int_c another time 

we see that now xps know our interrupt pin

4.png

we are done 

just click on export 

my references

How can I add external interrupts

how to write to mhs file

psf_rm(platform specification format reference manual

 

0 Kudos
Observer ali_gh70
Observer
541 Views
Registered: ‎07-20-2018

Re: how to use microblaze interrupt sdk for costum peripheral

Jump to solution
u are correct.
but i had to make another project for that .
sdk didn't update my lib automatically.(i had changed my edk project)
0 Kudos