摘要 |
PURPOSE: A method for automatically setting a DMA(Direct Memory Access) memory transmission threshold of an Ethernet controller is provided to improve transmission performance, even when transmitting a long packet besides a short packet. CONSTITUTION: A difference between a byte number of data entering a DMA(Direct Memory Access) memory and a byte number of data read from the DMA memory, to calculate a byte number accumulated in the DMA memory. The accumulated byte number is compared with a reference byte number. If the accumulated byte number is smaller than or equal to the reference byte number, the first control signal informing under-run is activated. If the first control signal is activated, or the accumulated byte number is larger than or equal to a transmission threshold, the second control signal is activated. If the accumulated byte number is smaller than the transmission threshold for a predetermined time, the third control signal is activated. If the second control signal is activated, the transmission threshold is increased by one. If the third control signal is activated, the transmission threshold is decreased by the second value and stored as an optional transmission threshold. A smaller value between the optional transmission threshold and a preset maximum transmission threshold is selected as the transmission threshold.
|