Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

A problem of interrupt handler in Virtex4

Status
Not open for further replies.

JaneZhong

Newbie level 5
Joined
May 14, 2006
Messages
8
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,336
xexc_registerhandler

Hi everybody!
I found a problem that the interrupt handler function was not implemented in my IP design of virtex4. I will express my work, if you find something wrong, please tell me about it. Thanks!

1. I add a custom IP,instance name is "test", with interrupt function. If write 1 to slv_reg0 , the inner counter will start up. Then as it adds to the required value, interrupt will take place. The interrupt logic is '1' when used, '0' when not used.
Moreover, interrupt handler wite '1' to slv_reg1, so as to change the interrupt logic from '1' to '0'.

2. To modify the MSS and MHS file.
in MHS:
begin ppc405_virtex4
PORT EICC405EXTINPUTIRQ = test_0_IP2INTC_Irpt
begin test
PORT IP2INTC_Irpt = test_0_IP2INTC_Irpt
in MSS:
driver test
PARAMETER int_handler = test_handler, int_port = IP2INTC_Irpt

3.Then in EDK8.2, modify software platform setting->interrupt handler->test_0,
to add test_handler instead of default handler.

4. interrupt handler is below:
void test_handler(void *baseaddr_p) {

Xuint32 *addr ;
addr = XPAR_TEST_0_BASEADDR ;

printf("--Entering the test handler--\r\n");

*(addr+1) = 1;

printf("--Leaving the test handler--\r\n");

}

5.
main()
{
print("-- Entering InterruptTest() --\r\n");

/* Initialize exception handling */
XExc_Init();
print("-- XExc_Init() --\r\n");

/* Register external interrupt handler */
XExc_RegisterHandler(XEXC_ID_NON_CRITICAL_INT, (XExceptionHandler)test_handler, (void *)XPAR_TEST_0_BASEADDR);
print("-- XExc_RegisterHandler() --\r\n");

/* Enable PPC non-critical interrupts */
XExc_mEnableExceptions(XEXC_NON_CRITICAL);
print("-- XExc_mEnableExceptions() --\r\n");

/* Enable TEST interrupts */
*((Xuint32*)XPAR_TEST_0_BASEADDR) = 0x1 ;

while(1);
}

6.the result that responds from UART is below

-- Entering InterruptTest() --
-- XExc_Init() --
-- XExc_RegisterHandler() --
-- XExc_mEnableExceptions() --

but don't print
--Entering the test dma handler--
--Leaving the test dma handler--

That's all.Thank you!
My Email is : jane.zhhj@gmail.com
welcome to contact me to discuss it
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top