FPGA, CPLD, and ASIC solutions from Altera
  • Download Center
  • Literature
Sign in/register
myAltera Account
Welcome
  •   myAltera
  •   Logout
  • Products
    • Devices
    • Design Software
    • Intellectual Property
    • Development Kits/Cables
    • Design & Support Services
    • Literature
  • End Markets
    • Automotive
    • Broadcast
    • Computer & Storage
    • Consumer
    • Industrial
    • Medical
    • Military
    • Test & Measurement
    • Wireless
    • Wireline
  • Technology
    • DSP
    • External Memory
    • Embedded Processing
    • Transceivers
    • Parallel I/O
    • Signal Integrity
    • System Integration
  • Training
    • Training Courses
    • University Program
    • Webcasts & Videos
    • Demonstrations
    • Events Calendar
  • Support
    • Design & Support Resources
    • Knowledge Database
    • Devices
    • Design Software
    • Intellectual Property
    • Development Kits/Cables
    • Design Examples
    • Downloads
    • User Communities/Forums
    • mySupport
  • About Altera
    • About Us
    • Environmental
    • Partners
    • Newsroom
    • Investor Relations
    • Jobs
    • Contact Us
  • Buy Online
    • Devices
    • Design Software
    • Development & Education Kits
    • Cables & Programming Hardware
    • Intellectual Property
  • Entire Site
  • Part Number
  • Knowledge Database
  • Support & Technical Docs
  • Forums & Wiki
Username:  
Password:  
 
Forgot my username or password
Don't have myAltera account? Register Now.
Enter your email address:


Home > Support > Knowledge Database > Support Solution

Solution ID: rd06062008_460
Last Modified: Jun 20, 2008
Product Category: Intellectual Property
Product Area: Other (Intellectual Property)
Product Sub-area: Other (IP)

Problem

The performance of the Triple-Speed Ethernet (TSE) MAC when used with the NicheStack networking stack seems slow for Quartus II software version 8.0. What is causing this problem?

Solution

There's a bug in the TSE MAC driver which causes a sent packet to be unecessarily copied into a temporary buffer before being dispatched to the TSE driver. The code section in which this bug is found is performing a conditional copy of a packet's contents to transform it from being word-unaligned to word aligned. The bug in this section of the driver arises because of a pointer dereferencing error, which is easily fixable through the steps outlined below:

1) Locate your Quartus® II IP directory installation, version 8.0: The default path for the root directory is typically C:\altera\80\ip on a Windows workstation.

2) Locate the TSE MAC driver folder: In the directory mentioned above, go into the triple_speed_ethernet\lib\sopc_builder\altera_triple_speed\UCOSII\src\iniche directory.

3) Modify the file ins_tse_mac.c : Open the file ins_tse_mac.c in a text editor. Locate the function tse_mac_raw_send, and within the body of this function, find the code block which looks like this:

if(((unsigned int)*data & 0x03) == 0)
{
/* 32-bit aligned start, then header starts ETHHDR_BIAS later => 16 bit shift is ok */
ActualData = (unsigned int*)data; /* base driver will detect 16-bit shift. */
}

Remove the asterisk from the data variable, so that the function now looks like this:

if(((unsigned int)data & 0x03) == 0)
{
/* 32-bit aligned start, then header starts ETHHDR_BIAS later => 16 bit shift is ok */
ActualData = (unsigned int*)data; /* base driver will detect 16-bit shift. */
}

Once you have done this, save and close the file.

After you have performed these steps, the next time you generate any project making use of the TSE MAC and NicheStack your project sources will contain the fix.

Note: If you have already generated your software project from a template, you can just modify the local copy of ins_tse_mac.c, which resides in your project's system library folder. Follow the instructions in step #3 (above), then rebuild your application.

 

Related Solutions

  • The performance of the TCP/IP protocol, when used with the NicheStack stack and the Altera® Triple Speed Ethernet (TSE) MAC, appears to have degraded in Nios® II EDS, version 7.2 and 8.0. Why is this occurring?


Feedback

     This solution answers my question:
Strongly Disagree
   
Strongly Agree
 
  1 2 3 4 5  
     This solution was easy to find:          
Strongly Disagree
   
Strongly Agree
 
  1 2 3 4 5  

    Please provide additional feedback to improve support solutions:


Altera does not warrant that this solution will work for the customer's intended purpose and disclaims all liability for use of or reliance on the solution.


  • Altera Troubleshooters
    • Overview
    • Licensing
    • Simulating with ModelSim
    • Timing Analysis
    • PLL Loss of Lock
    • FPGA Configuration
    • JTAG Config & ISP
    • PFL Troubleshooter
    • Jam, JBC and SVF
    • Usage Guidelines
    • Optimization Advisor
    Please Give Us Feedback
    Products | End Markets | Technology | Training | Support | About Altera | Buy Online
    Jobs | Investor Relations | Contact Us | Site Map | Privacy | Legal Notice
    Copyright © 1995-2010 Altera Corporation. All Rights Reserved.
    Altera Forum
    Altera
    Forum
    Twitter
    Twitter
    RSS
    RSS
    Facebook
    Facebook
    Flickr
    Flickr
    YouTube
    YouTube
    Email Updates
    Email
    Updates