Forum Discussion
Altera_Forum
Honored Contributor
12 years agoHi Daixiwen,
Now, I want to use this tutorial for the real application. The C Program code which have given to me for this tutorial is in attachment. Which print what the user types in the terminal window and send the message through the Ethernet port when the user presses the Enter key. If at any time a message is received, the received message will be printed in the terminal window. I modify it little bit like removing this part from the program: // Add new typed characters to the transmit frame until the user types the return character while ( (new_char = alt_getchar()) != '\n' ) { if (new_char == 0x08 && text_length > 0) { // Check if character is a backspace and if there is anything to delete alt_printf( "%c", new_char ); text_length--; // Maintain the terminal character after the text tx_frame[16 + text_length] = '\0'; } else if (text_length < 45) { // Check if there is still room in the frame for another character alt_printf( "%c", new_char ); // Add the new character to the output text tx_frame[16 + text_length] = new_char; text_length++; // Maintain the terminal character after the text tx_frame[16 + text_length] = '\0'; } } alt_printf( "\nsend> " ); text_length = 0; and now I am able to send via ethernet1 port to the my PC. but speed I am reaching is at 30 Mbps. I want to increase the speed around 400 Mbps, what Should be the modification? Does here changing the length from 62 to lets say 1024 help? // Create transmit sgdma descriptor alt_avalon_sgdma_construct_mem_to_stream_desc( &tx_descriptor, &tx_descriptor_end, tx_frame, 1024, 0, 1, 1, 0 ); or is there any other alternative?