Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12610 Discussions

DE2_115 Board not respond to ping request

Altera_Forum
Honored Contributor II
2,568 Views

I have run the simple_socket_server example on ALtera De2_115 board , though my code run's without any error but wont respond to my ping request from other PC it says Host unreachable. i have attached the print screen of run time console of Eclips. 

 

please help me out where i am wrong... 

 

regards 

 

kaushal
0 Kudos
29 Replies
Altera_Forum
Honored Contributor II
345 Views

OS: Windows-7 Home edition 

Quartus 11.0SP1 

Nios II Software Build Tools for Eclipse 

 

Code Stuck once i start received data from RS422 port on interrupt basis (VIC). 

Before Code Stuck Software Comfortably respond to ping request. 

once it stuck, i again download the Code on NIos-II, now it stuck during initilization process at "AUTO Nego PASSED". 

 

this problem keep on till i switch off the entire development board and again switch on and port the Software again
0 Kudos
Altera_Forum
Honored Contributor II
345 Views

Hello Friends 

 

i zero down the problem and found that if i disable the VIC initialization it keep on pinging without any problem. 

 

// Initialize the LOAD_DATA PIO. static void init_load_data() { // Recast the edge_capture pointer to match the alt_irq_register() function prototype. void* edge_capture_ptr = (void*) &edge_capture; // Enable LOAD interrupts. IOWR_ALTERA_AVALON_PIO_IRQ_MASK(LOAD_DATA_BASE, 0x01); // Reset the edge capture register. IOWR_ALTERA_AVALON_PIO_EDGE_CAP(LOAD_DATA_BASE, 0x1); // Register the ISR. # ifdef ALT_ENHANCED_INTERRUPT_API_PRESENT alt_ic_isr_register(LOAD_DATA_IRQ_INTERRUPT_CONTROLLER_ID,LOAD_DATA_IRQ,handle_load_interrupts,edge_capture_ptr, 0x0); # else alt_irq_register( LOAD_DATA_IRQ,edge_capture_ptr,handle_load_interrupts ); # endif }  

 

and in my code if i initilize the above code (below) it wont respond to ping request any more. 

 

//---VECTORED INTERRUPT CONTROLLER------------------------------------------------- printf("\n\tInitillize the Enhanced Interrupt.."); # ifdef LOAD_DATA_BASE init_load_data(); # endif  

 

 

 

even i have sucessfully used VIC in my other project and having same ESDK board but i hvan't face such kind of problem over there
0 Kudos
Altera_Forum
Honored Contributor II
345 Views

I don't know if a lot of people here are using the VIC so it may be difficult to help you on that... did you read the documentation (http://www.altera.com/literature/an/an595.pdf)? Are you sure the VIC and the Nios CPU are connected correctly and that you have configured some shadow register banks?

0 Kudos
Altera_Forum
Honored Contributor II
345 Views

 

--- Quote Start ---  

Are you sure that your ImgBuff table is big enough? How did you define/allocate it? 

I've never used the VIC but are you sure you are using the correct procedure to use it in your software? I think it is a bit different than the regular interrupt system. 

--- Quote End ---  

 

 

unsigned int ImgBuff[640][460];
0 Kudos
Altera_Forum
Honored Contributor II
345 Views

Hello Daixiwen, 

 

Yes , i have gone through Document AN595.pdf and with the help of this document only, i have come up to this point and even successfully develop the reverse chain of my current project (Receiving data based on External interrupt-outside form FPGA),  

 

Earlier or in my previous project, My FPGA generate a Signal which i use as a interrupt for reading data from an Arrya "ImgBuff[640][460]", with the help of VIC. 

in this current project Interrupt come from external board in serial format (RS422 ) i extract sync word from it and then generate a load signla which act as interrupt in this current project. 

Though i have made connection as per document AN595.pdf page-9 , but still i attached it with this post for your comment. 

 

*during downloading % of download is 0% up to address 08000120 is seems strange (please see attached downloading code.jpeg)
0 Kudos
Altera_Forum
Honored Contributor II
345 Views

I think your ImgBuff should beunsigned int ImgBuff; 

As for the download message it is perfectly normal. The nios download command firsts writes the exception vector at the bottom of the SRAM and then jumps 32 bytes. That's why you see a second line with the address just incremented by 20 hexa. Rounded in % it will still give you 0 because the jump was very small compared to the application size. 

EDIT: from what I can see the VIC connections look correct.
0 Kudos
Altera_Forum
Honored Contributor II
345 Views

kaushal, 

 

Overall, your problem sounds like either memory corruption or bad interrupt handling. I don't think you have a basic problem with the VIC, because if you did, then you would never get the network working in the first place since the SGDMA interrupts are routed through it as well. 

 

Taking a step back, since you have two projects/boards and it works on one and doesn't work on the other, I think you should review the differences between those projects/boards and look for things which you might have made a mistake while doing tasks manually. 

 

One example would be along the lines of your two separate projects have two separate SOPC/Qsys systems, and you have correctly setup EDGE triggered interrupts in one project, but still have default LEVEL triggered interrupts in the other. 

 

Another example would be to look at the memory layout etc. Taking the simple way out on that one, if you have adequate memory, you can oversize your buffers, task stacks, etc. and confirm those changes have no effect on working vs. not-working (this will give you confidence that the problem is not memory corruption related). 

 

Finally, you should learn how to use the debugger so that you can set breakpoints etc. in order to learn what the software is doing before/after it gets into the "broken" state. Similarly, if you suspect the issue is interrupt related, learn how to use SignalTap so you can watch the VIC before/after the broken state.
0 Kudos
Altera_Forum
Honored Contributor II
345 Views

Hello ted, 

 

Thanking you for your response, 

 

i have carefully reviewed both project and found no difference as i started my transmitter project by archiving and editing the receiver project, 

 

I have increase and decrease the memory but no gain but when i increase (+100) the unsigned char imgbuff[pktcount+100][pktsize+100]={0}; 

code stuck during/after receiving the data from RS422 port rather then start.
0 Kudos
Altera_Forum
Honored Contributor II
345 Views

That's too bad that it wasn't something easy like that. 

 

It sounds like you are probably going to have to end up debugging it, at least the software and possibly SignalTap as well. 

 

Good luck!
0 Kudos
Reply