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++
12590 Discussions

networking without OS Support

Altera_Forum
Honored Contributor II
3,011 Views

Hello ,  

 

I am trying to run networking application without Uc/OS-II Support, (not using standard UDP_Offload or Super_Loop)  

 

for this i have choose the simple socket server server (RGMII) example and strip out OS feature one by one,  

 

at the end it gives some error regarding  

 

1. FindLastFlashSector  

2. generate_and_store_mac_address  

3. get_board_mac_addr  

 

etc.  

 

though i have add the network_utilities.c and network_utilities.h but still i am facing the problem  

(see the attached printscreen of error)  

 

i am using Altera Cyclone-II Development Board "Embedded Development board"  

 

i have attached the c files  

1.network_utilities.c  

2.network_utilities.h  

3.simple_socket_server.c  

4.tse_my_system  

 

Regards 

 

kaushal
0 Kudos
23 Replies
Altera_Forum
Honored Contributor II
833 Views

Those errors are due to a typo in simple_socket_server.c 

You included 

# include "network_utilities.c

instead of 

# include "network_utilities.h"
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

Not done this myself, though might get there in the next few months. But I note that it says "multiple definitions" rather than not defined. If you look at your error list, it shows that you have one definition on line 23 and it is redefined on line 300 (or similar - can't see your attachment at the moment!). Have you got two copies of the code here? 

 

Simon
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

 

--- Quote Start ---  

Those errors are due to a typo in simple_socket_server.c 

You included# include "network_utilities.c

instead of# include "network_utilities.h

--- Quote End ---  

 

 

Hello Thanking you 

 

by adding network_utilities.h the error has gone 

 

once again thanking you. 

 

Regards 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

where do i put alt_iniche_init() and netmain() function so that my network hardware initialize , till now i have put these two function in network_utilitiese.c and simple_socket_server.c but it haven't yet initilize and during run time (when i do run as a nios hardware) it says 

panic: unlock NET 

dtrap -need breakpoint (please see attached print screen) 

 

regards 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

if i add these two function in simple_socket_server.c 

it generate bind error (please see attached print screen)
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

I've not told you in the previous post, but I was concerned you would be able to run an interniche application with neither OS nor superloop mode. 

The alt_iniche_init and netmain functions are supposed to create specific tasks with OS. If you call them in a non-OS environment they probably generate some sort of exception or they are possibly blocking, thus preventing your application from working.
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

hello Cris, 

me too think like this but , adding little delay after hardware initilize function alt_iniche_init() and netmain() ...it seems that it take MAC address and other things...but it stuck at Auto Negotiation pass etc(please see the print screen ) 

 

Regards 

 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

TK_SLEEP is a OS specific function (or maybe a macro): it is supposed to release the control to other tasks, but you don't have any, so you can't use it. 

I've seen non-OS implementations of sleep functions but they are blocking and they are only meant to add the time delay.
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

so is there any other way to go forward ...i mean what make hardware initialize up to "Auto Negotiation pass" not beyond that. 

it seems that it going to work...if it go up to auto negotiation. 

 

Regards 

 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

Up to MAC and PHY initialization, OS is not involved, since those are execute-once functions. 

You need OS features, superloop or any other interrupt scheduled process after inizialization when you really start sending and transmitting packets, especially if you need to manage a complex trasport protocol like tcp.
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

 

--- Quote Start ---  

Up to MAC and PHY initialization, OS is not involved, since those are execute-once functions. 

You need OS features, superloop or any other interrupt scheduled process after inizialization when you really start sending and transmitting packets, especially if you need to manage a complex trasport protocol like tcp. 

--- Quote End ---  

 

 

I am working on UDP only for image data transmission. 

 

earlier i am using uC/OS-II along with NicheStack having 64k data cache and 64 k Instruction chache, each time server (image source)sends high speed data my nios-ii based Client says "No free buffer for Rx" even though i have increase TSE_MAC FIFO rx buffer to its maximum limit. 

 

so i plan to remove OS as it may taking lot's of space. and do the same exercise again
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

I don't think you'll save a lot of time by removing the OS. If you need UDP performance, you need some hardware acceleration instead. This is what FPGAs are for after all.

0 Kudos
Altera_Forum
Honored Contributor II
833 Views

Dear Daixiwen, 

 

Thanking you for your suggestion, in that case could you suggest me how to acquire this high speed UDP data.  

 

regards 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

The only example I know about is the udp offload (http://www.alterawiki.com/wiki/nios_ii_udp_offload_example) example, but it will need some adaptations to the newest versions of Quartus I think.

0 Kudos
Altera_Forum
Honored Contributor II
833 Views

 

--- Quote Start ---  

The only example I know about is the udp offload (http://www.alterawiki.com/wiki/nios_ii_udp_offload_example) example, but it will need some adaptations to the newest versions of Quartus I think. 

--- Quote End ---  

 

 

Hello Daixiwen, 

 

I am using Quartus 11.0 SP1 and having Altera Embedded System Development Kit, Cyclone III Edition. 

 

i have download the reference design from 

 

http://www.alterawiki.co/wiki/nios_ii_udp_offload_example#3c120_port_2 (http://www.altera.com/products/devkits/altera/kit-emb-dev-cyc3.html) 

 

so should i need to install Quartus 9.0S P2 as this design is based on Quartus 9.0 or it can be converted to Quatus 11.0 too. 

 

Regards 

 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

Hello There, 

 

Compiling UDP affload design on quartus 9.0 SP2 generate en error:  

saying "Peak Virtual Memory : 395 MB" please see the attached print-screen of an error. 

 

as this is std. reference design why this error generate..? 

 

 

regards 

 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

I think there was a thread on this forum a little while ago about compiling the udp offload example on a more modern version of Quartus. You should try a search on the forum.

0 Kudos
Altera_Forum
Honored Contributor II
833 Views

 

--- Quote Start ---  

I think there was a thread on this forum a little while ago about compiling the udp offload example on a more modern version of Quartus. You should try a search on the forum. 

--- Quote End ---  

 

 

Hello There, 

 

One Unique problem i have seen in this error , as i change the quartus version from 9.0 to 9.1 and 11.0 the requirement of Peak virtual memory increase. 

 

as in Q9.0 it says "Peak virtual memory: 395MB" 

as in Q9.1 it says "Peak virtual memory: 407MB" 

as in Q11.0 it says "Peak virtual memory:540 MB" 

(attached print screen of all three quartus version's) 

 

i have gone through the thread related to same issue, but don't find any clue though i have valid license for all above quartus version's. 

 

http://www.alteraforum.com/forum/showthread.php?t=19377 

 

Regards 

 

kaushal
0 Kudos
Altera_Forum
Honored Contributor II
833 Views

The real error message isn't the peak memory line (which is just an information) but the first one, about the empty clock collection. It seems that the clock name in line 39 of the test_project_top.sdc file is wrong.

0 Kudos
Altera_Forum
Honored Contributor II
756 Views

Hello Daixiwen, 

if i set test_project_top.v (top level design file without making it symbol file) as a top level entity then compile the project there is no problem ....but it generate .sof only..... 

 

Regards 

 

kaushal
0 Kudos
Reply