FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6479 Discussions

[TSE] how have the datas from fifo tse ?

Altera_Forum
Honored Contributor II
3,713 Views

Hi, 

I need some help about triple speed ethernet (tse) to receive and transmit datas. 

I have paid for IP-TRIETHERNET + IP-NIOS + IP-TCPIP-NIOS. 

The altera support and commercial contact told me that I need only this pack to do the gigabit... 

I add gigabit to our board. We need 10/100 and 1G in ethernet. 

We use the marvel 88E1111 like phy and cyclone II (stratix III too on other board). 

We connect the phy marvell with altera in mii / gmii mode. 

I have a nios II with the tse module. 

With the advise of altera support, I do my sopc project with the "Triple Speed Ethernet Data Path Rference Design" 

aka AN483. 

But with this exemple , I can't send my own datas or receive and display the datas that I receive. 

The module "eth_gene" can send only random datas or incremental datas and "eth_moni" can count the bytes received  

and mentionned if packets with error or not. 

I don't understand why we need other module to have the datas or to send our own messages because I paid for doing  

all in gigabit. 

If I want to use the "simple socket server " exemple code, I need to use the "sgdma" module but it is not free. 

(see in ug_ethernet.pdf 6.2) 

And why didn't tell me that I need other thing to use my tse pack ? 

So, is the sgdma module important ? necessary ? or can I create my own module to use the streaming  

(in and out) from my tse module in the nios. 

Our board must send any datas that we want and receive any datas on ethernet. 

How can I access to the datas in the fifo of the triple speed ethernet module ? 

I need help about this and it's very urgent. 

Thanks  

Cordialy, 

Benoît 

 

Edit : 

my .qar file ici (http://exterminabur.free.fr/etep608a_dtd_ben.qar)
0 Kudos
33 Replies
Altera_Forum
Honored Contributor II
734 Views

Hello Cris, 

I hope that you see this message as soon as possible. 

 

So, I added this code : 

tse_mac_device.desc_mem_base=DESCRIPTOR_MEMORY_BASE; tse_mac_device.ext_desc_mem=1;//0; tse_mac_device.tse_en_maclite=TRIPLE_SPEED_ETHERNET_0_ENABLE_MACLITE; tse_mac_device.tse_mac_base=TRIPLE_SPEED_ETHERNET_0_BASE; tse_mac_device.tse_maclite_gige=TRIPLE_SPEED_ETHERNET_0_MACLITE_GIGE; tse_mac_device.tse_mdio_shared=TRIPLE_SPEED_ETHERNET_0_MDIO_SHARED; tse_mac_device.tse_multichannel_mac=TRIPLE_SPEED_ETHERNET_0_IS_MULTICHANNEL_MAC; tse_mac_device.tse_num_of_channel=TRIPLE_SPEED_ETHERNET_0_NUMBER_OF_CHANNEL; tse_mac_device.tse_number_of_mac_mdio_shared=TRIPLE_SPEED_ETHERNET_0_NUMBER_OF_MAC_MDIO_SHARED; tse_mac_device.tse_pcs_ena=TRIPLE_SPEED_ETHERNET_0_PCS; tse_mac_device.tse_pcs_sgmii=TRIPLE_SPEED_ETHERNET_0_PCS_SGMII; // tse_mac_device.tse_phy_cfg=alt_tse_phy_init;//(pmac); tse_mac_device.tse_phy_mdio_address=0x12; tse_mac_device.tse_rx_depth=TRIPLE_SPEED_ETHERNET_0_RECEIVE_FIFO_DEPTH; tse_mac_device.tse_sgdma_rx=RX_SGDMA_NAME; tse_mac_device.tse_sgdma_rx_irq=TX_SGDMA_IRQ; tse_mac_device.tse_sgdma_tx=TX_SGDMA_NAME; tse_mac_device.tse_shared_fifo_rx_ctrl_base=0; tse_mac_device.tse_shared_fifo_rx_depth=0; tse_mac_device.tse_shared_fifo_rx_stat_base=0; tse_mac_device.tse_shared_fifo_tx_ctrl_base=0; tse_mac_device.tse_shared_fifo_tx_depth=0; tse_mac_device.tse_shared_fifo_tx_stat_base=0; tse_mac_device.tse_tx_depth=TRIPLE_SPEED_ETHERNET_0_TRANSMIT_FIFO_DEPTH; tse_mac_device.tse_use_mdio=1; tse_mac_device.use_shared_fifo=TRIPLE_SPEED_ETHERNET_0_REGISTER_SHARED; I add it in the "main" in "iniche_init.c" file. 

 

But the program reboot after "SSSInitialTask" has launched and I have the message on the uart debug :  

 

--- Quote Start ---  

... 

INFO : PHY[0.0] - Auto-Negotiation PASSED 

INFO : Applying additional PHY configuration of Marvell 88E1111 

 

INFO : PHY[0.0] - Checking link... 

INFO : PHY[0.0] - Link established 

INFO : PHY[0.0] - Speed = 1000, Duplex = Full 

OK, x=5, CMD_CONFIG=0x00000000 

 

MAC post-initialization: CMD_CONFIG=0x0400020b 

[tse_sgdma_read_init] RX descriptor chain desc (1 depth) created 

mctest init called 

IP address of et1 : 192.168.1.234 

Created "Inet main" task (Prio: 2) 

Created "clock tick" task (Prio: 3) 

 

Simple Socket Server starting up 

[sss_task] Simple Socket Server listening on port 30 

Created "simple socket server" task (Prio: 4) 

boot etep608A ... 

--- Quote End ---  

I don't know why. 

 

Just ,when I configure "tse_mac_device[0].ext_desc_mem" to '0' instead of '1' , the program reboot before ,here exactly : 

 

--- Quote Start ---  

... 

INFO : PHY[0.0] - Auto-Negotiation PASSED 

INFO : Applying additional PHY configuration of Marvell 88E1111 

 

INFO : PHY[0.0] - Checking link... 

INFO : PHY[0.0] - Link established 

INFO : PHY[0.0] - Speed = 1000, Duplex = Full 

OK, x=5, CMD_CONFIG=0x00000000 

 

MAC post-initialization: CMD_CONFIG=0x0400020b 

[tse_sgdma_read_init] RX descriptor chain desc (1 depth) created 

 

boot etep608A .. 

--- Quote End ---  

I put my .spoc file and system.h file ,maybe you'll see something of obvious^^ 

 

thanks again.
0 Kudos
Altera_Forum
Honored Contributor II
734 Views

Hi exterminabur,  

I looked at your sopc file. I couldn't see anything wrong, but I'm concerned about Memory module dimension which is r/w for dma: it is only 4Kbytes and I really don't know if this is enough for correct tse operation. A single Ethernet frame can be about 1500bytes long, so your memory would fill very soon. I used main ram in all my designs. Try removing Memory and connect sgdma to ramprog. 

 

About TSE initialization: 

I started with a different sample project, so I don't have a iniche_init.c file. 

Anyway I didn't need to add all those tse_mac_device[0].xxx initializations: they are made automatically by the drivers in my case. 

I use the the SSS sample base on iniche and Micrium RTOS. Do you use OS or are you using iniche superloop? 

 

Regards 

Cris
0 Kudos
Altera_Forum
Honored Contributor II
734 Views

Hi and thanks 

 

for the memory, I try to double the size but I have an other memory ram like ramprog ( I think that i ' ll add it in my sopc and use it). 

 

I use the "simple socket server" from nios II ide (9.1) and there is a "iniche_init.c", it is the file where there are main and others task init. 

I upload it here. 

 

so I use too the SSS sample base on iniche and Micrium RTOS, that why I don't understand... my problems. (superloop not active) 

 

For the tse_mac_device[0] initialisations, I'm surprised too that I thought they are made automatically by the drivers... 

I have maybe a wrong ss sample in my nios II ide (is it possible ?) 

 

My ss sample are the files : 

-alt_error_handler.c 

-alt_error_handler.h 

-iniche_init.c 

-led.c 

-network_utilities.c 

-network_utilities.h 

-simple_socket_server.c 

-simple_socket_server.h
0 Kudos
Altera_Forum
Honored Contributor II
734 Views

You are right. I looked at the standard SSS template in Altera directory and I have the same files. 

I have different tasks and files in my current design but the base structure is the same. So the only difference I can see from mine is your usage of memory. 

 

Regarding tse initialization, in my project everything is performed in als_sys_init() function: this is in the alt_sys_init.c auto generated file, located where system.h is. 

 

Cris
0 Kudos
Altera_Forum
Honored Contributor II
734 Views

ok 

now with my "memory" with double size, the program doesn't reboot. 

but I haven't ping or else.... just the connexion at 1 Gbits is ok. 

 

for the "alt_sys_init.c", I must call it or the calling is automatically done too ? 

 

 

Edit: look my bsp please, I think I haven't the good options selected 

(rename it in .bsp)
0 Kudos
Altera_Forum
Honored Contributor II
734 Views

alt_sys_init() is called automatically upon startup by alt_main(). 

I don't know how to import bsp files: I use Ide 9.0. 

I'm very busy in these days. I'm afraid I can't give you much help.
0 Kudos
Altera_Forum
Honored Contributor II
734 Views

understood ! 

thanks again 

 

but I have a main() not a alt_main(). 

In ss sample , we can use alt_main ?, I have a "main()" directly in my project 

 

for bsp, I must see how give the options here. 

 

I hope an other personn will help me ^^ like you 

thanks 

 

Cordialy, 

Ben
0 Kudos
Altera_Forum
Honored Contributor II
734 Views

Assembler startup code calls alt_main to initialize HAL drivers. 

Then alt_main() calls your appllication main() 

I suggest you compile everything in debug mode, place a breakpoint in alt_main and step into the code to check if everything is initialized correctly.
0 Kudos
Altera_Forum
Honored Contributor II
734 Views

I can't do that , I don't have jtag debug in our board .... 

but I don't understand why in ss sample , there is a main but not mention of alt_main . 

 

I'm sad not to find what my problem. 

 

Now, I add my external memory for the descriptor.
0 Kudos
Altera_Forum
Honored Contributor II
734 Views

before I have installed the nios II ide 9.1 version, so after I re install the nios II ide (version 9.0 + 9.0sp2) but this error is arrived. 

 

" but after compilation, I have this error Creating generated_app.mk... Creating system.h... 3 août 2010 11:44:45 - (GRAVE) generate: java.lang.IllegalStateException: java.lang.IllegalStateException: java.lang.NumberFormatException: empty String make: *** Error 1 make: *** Error 2" 

 

any one can help me ,please ? 

 

I launch quartus 9.0sp2 before, next I launch nios II ide 9.0 sp2 (fresh re installation)) and I compile my soft but I have this error.
0 Kudos
Altera_Forum
Honored Contributor II
734 Views

I resilve this problem with replacing "none" in "system clock timer" (in system library properties) by "timer_0". 

 

now,I try to jump from my boot to my ram (I have a software in my boot that jumps in my software program in ram) or I need some help to compile my program software in nios II ide 9.0sp2 (options for "system library properties" ?, options for sopc builder in quartus for cpu ?) to launch my software directely in ram . 

 

thanks for any help
0 Kudos
Altera_Forum
Honored Contributor II
734 Views

any one has info about 88e1111

0 Kudos
Altera_Forum
Honored Contributor II
734 Views

The 88e1111 datasheet isn't publicly available. You need to ask Marvell to get it and sign an NDA. 

I avoid Marvell products for this reason.
0 Kudos
Reply