Adaptive access control in LAN relaying apparatus

In a LAN relaying apparatus, a reception side control circuit receives a reception side write pointer from a reception side write control circuit and a reception side read pointer from a reception side read control circuit, and determines a reception side pointer difference between the side reception side write pointer and the reception side read pointer. Then, the control circuit controls the reception side read control circuit to start the second side read operation when the reception side pointer difference is equal to a reception side first threshold held therein. Subsequently, the reception side control circuit controls the reception side write control circuit and the reception side read control circuit such that the first side write operation or the second side read operation is carried out based on the reception side pointer difference, when the reception side pointer difference is not equal to the reception side first threshold after the start of the second side read operation.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an adaptive access control method and a LAN (Local Area Network) relaying apparatus using the same.

2. Description of the Related Art

Conventionally, a flow control method is used in a LAN relaying apparatus in order to avoid congestion on a transmission line. For example, Japanese Laid Open Patent Application (JP-P2000-269997A) discloses a technique in which a flow control is carried out from a transmission side if the congestion exceeds a preset threshold on a reception side.FIG. 1shows the system structure of a line processing section in this conventional LAN relaying apparatus.

Referring toFIG. 1, the line processing section of the LAN relaying apparatus is composed of a reception side memory circuit71and a transmission side memory circuit75. A write operation of a line reception side data input signal is carried out to the reception side memory circuit71in response to a reception side write control signal from a reception side write control circuit73. Also, a read operation of a system reception side data output signal is carried out to the reception side memory circuit71in response to a reception side read control signal of a reception side read control circuit74.

The reception side write control circuit73supplies the reception side write control signal to the reception side memory circuit71, and supplies a reception side write pointer to a reception side fixed threshold control circuit72. The reception side read control circuit74supplies the reception side read control signal to the reception side memory circuit71, and supplies a reception side read pointer to the reception side fixed threshold control circuit72.

A fixed threshold can be previously set into the reception side fixed threshold control circuit72from a micro processor interface circuit79. A difference between the reception side write pointer of the reception side write control circuit73and the reception side read pointer of the reception side read control circuit74with the preset fixed threshold are compared with each other. If the difference is equal to or greater than the threshold, the reception side fixed threshold control circuit72supplies a transmission side flow control request signal to a transmission side fixed threshold control circuit76in order to carry out a flow control to the transmission side.

A write operation of a system transmission side data input signal is carried out to the transmission side memory circuit75in response to a transmission side write control signal of a transmission side write control circuit78. Also, a read operation of a transmission side data output signal is carried out to the transmission side memory circuit75in response to a transmission side read control signal of a transmission side read control circuit77. The transmission side write control circuit78supplies a transmission side write control signal to the transmission side memory circuit75, and supplies a transmission side write pointer to the transmission side fixed threshold control circuit76. The transmission side read control circuit77supplies a transmission side read control signal to the transmission side memory circuit75, and supplies a transmission side read pointer to the transmission side fixed threshold control circuit76.

A fixed threshold can previously set into the transmission side fixed threshold control circuit76from the micro processor interface circuit79. A difference between the transmission side write pointer of the transmission side write control circuit78and the transmission side read pointer of the transmission side read control circuit77with a preset fixed threshold are compared with each other. If the difference is equal to or greater than the threshold, the transmission side fixed threshold control circuit76supplies a reception side flow control request signal to the reception side fixed threshold control circuit72, in order to carry out a flow control to the reception side. Also, the transmission side fixed threshold control circuit76outputs a pause frame to a line transmission side in response to a transmission side flow control request signal supplied from the reception side fixed threshold control circuit72.

However, the above-mentioned conventional LAN relaying apparatus uses only the preset fixed thresholds. Thus, if a normal access cannot be carried out due to a clock skew between the line side and the system side or a queuing process on the system side, it is impossible to attain an adaptive operation to the normal access.

Also, the conventional LAN relaying apparatus only has an object to prevent the congestion occurring in a part of a transmission line from being spread to other normal transmission lines. Thus, the congestion avoiding control is fixed.

In conjunction with the above description, a flow control method between ATM-LAN node is disclosed in Japanese Laid Open Patent Application (JP-A-Heisei 7-283817). In this conventional example, whether the number of cells in a buffer of the node exceeds a predetermined threshold value is checked. If the number of cells exceeds the threshold value, a cell transmission prohibition cell is sent to a node on the upper stream side to carry out a flow control between the adjacent nodes. In the cell transmission prohibition state, when the number of cells in the buffer is less than the threshold value, a cell transmission prohibition cancel cell is sent to the upper stream node to permit the transmission of the cells from the upper stream node.

Also, a data communication method is disclosed in Japanese Laid Open Patent Application (JP-P-Heisei 10-70555). In this conventional example, the data communication method is used in a communication system with a switching system and port cards, each of which has a buffer or is connected to a buffer. The buffer is adaptive to be connected with or is incorporated in the switching system. The buffer has a buffer occupation percentage defined as a ratio of the number of memory locations which can be used to store input data in the buffer and a total of the memory locations in the buffer. A plurality of priority data flows inputted to and outputted from the port card are controlled. The plurality of priority data are of a plurality of data types which includes a first data type that has a first priority and a second data type that has a second priority lower than the first priority. The first data type contains a first priority bit stream and the second data type has a second priority bit stream. The transmission of all the second priority bit streams to the port card which has a buffer occupation percentage higher than a second threshold value which is higher than a first threshold value is set to a non-operation state. The transmission of the second priority bit stream to the port card is set to an operable state when the buffer occupation percentage falls below the first threshold value. The transmission of all the first priority bit streams to the port card which has a buffer occupation percentage higher than a fourth threshold value which is higher than a third threshold value which is higher than the second threshold value is set to a non-operation state. The transmission of the second priority bit stream to the port card is set to an operable state when the buffer occupation percentage falls below the first threshold value.

Also, a bi-directional routing switch for a digital signal is disclosed in Japanese Laid Open Patent Application (JP-A-Heisei 10-224376). In this conventional example, the routing switch routs a digital signal containing some digital signal cells of two types at least. The first type requests the consistence of the cell transmission but admits a variable bit rate transmission. The second type admits that some of transmitted cells are lost. The routing switch is composed of a plurality of input ports to receive input cells, and an output ports to output the output cells. A buffer circuit is connected with the input ports and the output ports and holds a plurality of cells of the respective types before the cells are outputted from the output port after being received from the input ports. The buffer has a first buffer capacity for the first type of cells and a second buffer capacity for the second type of cells. A control circuit determines whether each input cell is of the first type or of the second type. The control circuit stores the input cells of the first type in the first buffer capacity when the number of input cells reaches a predetermined value, and sets a state in which a flow control signal is selected, to block the input cells of the first type. In addition, the control circuit stores the input cells of the second type in the second buffer capacity when the number of input cells of the second type does not reach the predetermined value, and discards the input cells of the second type when the number of input cells of the second type reaches the predetermined value.

Also, a switching hub is disclosed in Japanese Laid Open Patent Application (JP-A-Heisei 10-276224). In this conventional example, the switching hub is composed of a plurality of ports, a buffer provided in common to the plurality of ports or for every port, to store transfer data temporarily, a network interface section which is connected with each of the ports to carry out a communication control, and a switching section which selectively switches the connection of the buffer and the network interface section. A plurality of threshold values are set step-by-step in accordance with a data quantity in the buffer, and a transmission stop time is set for every threshold value. A data quantity monitoring section stops the transmission for the transmission stop time each time the data quantity exceeds one of the plurality of threshold values.

Also, a flow control method is disclosed in Japanese Laid Open Patent Application (JP-P2000-36839). In this conventional example, a data communication network has a plurality of data traffic sources which are interconnected with a transmission link. In order to avoid congestion in a flow control node, the flow of the data traffic through the above flow control node from the source is controlled. The traffic which passes the above flow control node is monitored to detect a congestion state. The source of the traffic contributing to the above congestion is distinguished in response to the detection of the congestion state, and a temporary stop time is calculated for which the distinguished source stops the transmission to the flow control node. The calculated temporary stop time is varied by a random quantity, and a temporary stop command containing the varied temporary stop time is transmitted to the distinguished source.

Also, a flow control circuit is disclosed in Japanese Laid Open Patent Application (JP-P2001-203705A). In this conventional example, the flow control circuit is composed of a reception buffer which holds receive data, an empty buffer region calculating section which calculates an empty space in the reception buffer, an upper limit value holding section holding an upper limit value of the empty quantity of the reception buffer, and a minimum value holding section holding a minimum value of the empty quantity of the reception buffer. A mode switching value holding section holds a mode switching value to switch a data transmission mode from a back pressure method to a credit method. A flow control data generating section outputs a flow control data to a transmission side to carry out the data transmission in the back pressure method when the calculated empty space region is in the range between the upper limit and the low limit. The flow control data generating section outputs the flow control data to the transmission side to carry out the data transmission in the credit method when the calculated empty space region reaches the mode switching value, until the empty quantity of the reception buffer reaches the upper limit.

SUMMARY OF THE INVENTION

Therefore, an object of the present invention is to provide an adaptive access control method and a LAN relaying apparatus using the same, in which an adaptive access control to a memory circuit can be carried out.

Another object of the present invention is to provide an adaptive access control method and a LAN relaying apparatus using the same, in which a stable memory access control can be carried out.

In an aspect of the present invention, a LAN relaying apparatus includes a reception side memory circuit, a reception side write control circuit, and a reception side read control circuit. Data is written from a first side into the reception side memory circuit based on a reception side write control signal and is read out from the reception side memory circuit to a second side based on a reception side read control signal. The reception side write control circuit has a reception side write pointer to the reception side memory circuit and outputs the reception side write control signal to the reception side memory circuit for a first side write operation. The reception side read control circuit has a reception side read pointer to the reception side memory circuit and outputs the reception side read control signal to the reception side memory circuit for a second side read operation. The reception side control circuit receives the reception side write pointer from the reception side write control circuit and the reception side read pointer from the reception side read control circuit, and determines a reception side pointer difference between the side reception side write pointer and the reception side read pointer. Then, the reception side control circuit controls the reception side read control circuit to start the second side read operation when the reception side pointer difference is equal to a reception side first threshold held therein. Subsequently, the reception side control circuit controls at least one of the reception side write control circuit and the reception side read control circuit such that at least one of the first side write operation and the second side read operation is carried out based on the reception side pointer difference, when the reception side pointer difference is not equal to the reception side first threshold after the start of the second side read operation.

Here, the reception side control circuit may hold a reception side second threshold larger than the reception side first threshold, and output a first side flow control request signal such that a signal corresponding to the first side flow control request signal is transmitted to the first side for a first side flow control, when the reception side pointer difference is equal to or larger than the reception side second threshold.

In this case, the reception side control circuit may have a reception side third threshold larger than the reception side second threshold, and control the reception side write control circuit and the reception side read control circuit to stop access to the reception side memory circuit when the pointer difference is equal to or larger than the reception side third threshold.

Also, the reception side control circuit may provide a pause frame such that the pause frame is transmitted to the second side.

Also, the reception side control circuit may control only the reception side write control circuit when the reception side pointer difference is not equal to the reception side first threshold after the start of the second side read operation.

Instead, the reception side control circuit may control only the reception side read control circuit when the reception side pointer difference is not equal to the reception side first threshold after the start of the second side read operation.

Otherwise, the reception side control circuit may control both of the reception side write control circuit and the reception side read control circuit when the reception side pointer difference is not equal to the reception side first threshold after the start of the second side read operation.

Also, the reception side control circuit may include a comparing circuit, a holding circuit and a reception side adaptive control circuit. The comparing circuit compares the reception side write pointer and the reception side read pointer to determine the reception side pointer difference. The holding circuit holds the reception side first to third thresholds. The reception side adaptive control circuit controls at least one of the reception side write control circuit and the reception side read control circuit when the reception side pointer difference is not equal to the reception side first threshold after the start of the second side read operation such that at least one of the first side write operation and the second side read operation is carried out based on the reception side pointer difference. Also, the reception side adaptive control circuit outputs the first side flow control request signal such that the signal corresponding to the first side flow control request signal is transmitted to the first side, when the pointer difference is equal to or larger than the reception side second threshold, and controls the reception side write control circuit and the reception side read control circuit to stop access to the reception side memory circuit when the pointer difference is equal to or larger than the reception side third threshold.

Also, the reception side control circuit may further include a reception side flow control circuit which generates a second side flow control instruction signal from a second side flow control request signal supplied thereto. In this case, the reception side adaptive control circuit writes the signal corresponding to the second side flow control instruction signal in the reception side memory circuit such that the signal corresponding to the second side flow control instruction signal is transmitted to the second side.

Also, the reception each of the reception side first to third thresholds is desirably variable.

Also, the LAN relaying apparatus may further include a transmission side memory circuit, a transmission side write control circuit, a transmission side read control circuit and a transmission side control circuit. Data is written into the transmission side memory circuit from the second side based on a transmission side write control signal and the data is read out to the first side based on a transmission side read control signal. The transmission side write control circuit has a transmission side write pointer to the transmission side memory circuit and which outputs the transmission side write control signal to the transmission side memory circuit for a second side write operation. The transmission side read control circuit has a reception side read pointer to the transmission side memory circuit and which outputs the transmission side read control signal to the transmission side memory circuit for a first side read operation. The transmission side control circuit receives the transmission side write pointer from the transmission side write control circuit and the transmission side read pointer from the transmission side read control circuit, and determines a transmission side pointer difference between the side transmission side write pointer and the transmission side read pointer. The transmission side control circuit controls the transmission side read control circuit to start the first side read operation when the transmission side pointer difference is equal to a transmission side first threshold held therein. Then, the transmission side control circuit controls at least one of the transmission side write control circuit and the transmission side read control circuit such that at least one of the second side write operation and the first side read operation is carried out based on the transmission side pointer difference, when the transmission side pointer difference is not equal to the transmission side first threshold after the start of the first side read operation.

Also, the transmission side control circuit may hold a transmission side second threshold larger than the transmission side first threshold, and output a second side flow control request signal such that a signal corresponding to the second side flow control request signal is transmitted to the second side for a second side flow control, when the transmission side pointer difference is equal to or larger than the transmission side second threshold.

Also, the transmission side control circuit may have a transmission side third threshold larger than the transmission side second threshold, and control the transmission side write control circuit and the transmission side read control circuit to stop access to the transmission side memory circuit when the pointer difference is equal to or larger than the transmission side third threshold.

Also, the transmission side control circuit may provide a pause frame such that the pause frame is transmitted to the first side.

Also, the transmission side control circuit may control only the transmission side write control circuit when the transmission side pointer difference is not equal to the transmission side first threshold after the start of the first side read operation.

Instead, the transmission side control circuit may control only the transmission side read control circuit when the transmission side pointer difference is not equal to the transmission side first threshold after the start of the first side read operation.

Otherwise, the transmission side control circuit may control both of the transmission side write control circuit and the transmission side read control circuit when the transmission side pointer difference is not equal to the transmission side first threshold after the start of the first side read operation.

Also, the transmission side control circuit may include a comparing circuit, a holding circuit, and a transmission side adaptive control circuit. The comparing circuit compares the transmission side write pointer and the transmission side read pointer to determine the transmission side pointer difference. The holding circuit holds the transmission side first to third thresholds. The transmission side adaptive control circuit controls at least one of the transmission side write control circuit and the transmission side read control circuit when the transmission side pointer difference is not equal to the transmission side first threshold after the start of the first side read operation such that at least one of the first side write operation and the second side read operation is carried out based on the transmission side pointer difference. Also, the transmission side adaptive control circuit outputs the first side flow control request signal such that the signal corresponding to the second side flow control request signal is transmitted to the second side, when the pointer difference is equal to or larger than the transmission side second threshold. Then, the transmission side adaptive control circuit controls the transmission side write control circuit and the transmission side read control circuit to stop access to the transmission side memory circuit when the pointer difference is equal to or larger than the transmission side third threshold.

Also, the transmission side control circuit may further include a transmission side flow control circuit which generates a first side flow control instruction signal from a first side flow control request signal supplied thereto. At this time, the transmission side adaptive control circuit writes the signal corresponding to the first side flow control instruction signal in the transmission side memory circuit such that the signal corresponding to the first side flow control instruction signal is transmitted to the first side.

Also, the transmission each of the transmission side first to third thresholds is desirably variable.

DESCRIPTION OF THE PREFERRED EMBODIMENT

Hereinafter, a LAN relaying apparatus of the present invention will be described below with reference to the attached drawings.

FIG. 2is a block diagram showing the structure of a line processing section of a LAN relaying apparatus according to the first embodiment of the present invention. Referring toFIG. 2, the line processing section of the LAN relaying apparatus according to the first embodiment of the present invention is composed of a reception side memory circuit1, a reception side adaptation threshold control circuit2, a reception side write control circuit3, a reception side read control circuit4, a transmission side memory circuit5, a transmission side adaptation threshold control circuit6, a transmission side read control circuit7, a transmission side write control circuit8and a micro processor interface circuit9.

In the line processing section of the LAN relaying apparatus according to the first embodiment of the present invention, when a line reception side input data signal is supplied from a line side to the reception side memory circuit1, a write operation of the line reception side input data signal is carried out to the reception side memory circuit1in response to a reception side write control signal supplied from the reception side write control circuit3. The data signal written into the reception side memory circuit1is read out from the reception side memory circuit1in response to the reception side read control signal of the reception side read control circuit4, and supplied as a system reception side data output signal to a system side.

The reception side write control circuit3supplies the reception side write control signal to the reception side memory circuit1, and supplies a reception side write pointer to the reception side adaptive threshold control circuit2. The reception side read control circuit4supplies the reception side read control signal to the reception side memory circuit1, and supplies a reception side read pointer to the reception side adaptive threshold control circuit2. The reception side adaptive threshold control circuit2can previously set with three kinds of reception side thresholds (a reception side low threshold, a reception side middle threshold and a reception side high threshold) from the micro processor interface circuit9. Here, the three kinds of the reception side thresholds can be properly set through the micro processor interface circuit9by a micro processor (not shown) based on a state of a flow control in the line processing section of the LAN relaying apparatus, and their values can be varied.

Also, the reception side adaptive threshold control circuit2compares the reception side write pointer from the reception side write control circuit3with the reception side read pointer from the reception side read control circuit4. If detecting the increase or a decrease from a preset reference pointer difference, the reception side adaptive threshold control circuit2supplies a reception side adaptive difference read control signal to the reception side read control circuit4in order to protect an occurrence of overflow or underflow in the reception side memory circuit1. The three kinds of the reception side thresholds are intended to detect the increase or the decrease from the reference pointer difference. Also, the reception side adaptive threshold control circuit2supplies a transmission side flow control request signal to the transmission side adaptive threshold control circuit6in order to carry out the flow control on the line side, and a line side flow control instruction signal corresponding to the transmission side flow control request signal is transmitted from the transmission side adaptive threshold control circuit6to the line side through the transmission side memory circuit5in response to the transmission side flow control request signal. Thus, a line side access control to the reception side memory circuit1is carried out in accordance with the line side flow control instruction signal. Also, when receiving a reception side flow control request signal from the transmission side adaptive threshold control circuit6, the reception side adaptive threshold control circuit2outputs a system side flow control instruction signal to the reception side memory circuit1, which is transmitted to the system side. Thus, a system side access control to the transmission side memory circuit5is carried out in accordance with the system side flow control instruction signal.

When a system transmission side data input signal is supplied to the transmission side memory circuit5, a write operation of the system transmission side data input signal is carried out to the transmission side memory circuit5in response to the transmission side write control signal supplied from the transmission side write control circuit8. The data signal written to the transmission side memory circuit5is read out from the transmission side memory circuit5in response to the transmission side read control signal from the transmission side read control circuit7, and is supplied as a line transmission side data output signal to the line side.

The transmission side write control circuit8supplies the transmission side write control signal to the transmission side memory circuit5, and supplies a transmission side write pointer to the transmission side adaptive threshold control circuit6. The transmission side read control circuit7supplies the transmission side read control signal to the transmission side memory circuit5, and supplies a transmission side read pointer to the transmission side adaptive threshold control circuit6.

The transmission side adaptive threshold control circuit6can previously set with three kinds of transmission side thresholds (a transmission side low threshold, a transmission side middle threshold and a transmission side high threshold) from the micro processor interface circuit9. Here, the three kinds of the transmission side thresholds can be properly set through the micro processor interface circuit9by the micro processor (not shown) based on the state of the flow control in the line processing section of the LAN relaying apparatus, and their values can be varied.

The transmission side adaptive threshold control circuit6compares the transmission side write pointer from the transmission side write control circuit8with the transmission side read pointer from the transmission side read control circuit7. If detecting an increase or decrease from a preset reference pointer difference, the transmission side adaptive threshold control circuit6supplies a transmission side adaptive difference read control signal to the transmission side read control circuit7in order to protect the occurrence of overflow or underflow in the transmission side memory circuit5. The three kinds of the transmission side thresholds are intended to detect the increase or decrease from the reference pointer difference.

Also, the transmission side adaptive threshold control circuit6supplies the reception side flow control request signal to the reception side adaptive threshold control circuit2in order to carry out the flow control on the system side. In response to the reception side flow control request signal, a system side flow control instruction signal is written in the reception side memory circuit1by the reception side adaptive threshold control circuit2and transmitted to the system side. Thus, the flow control to the transmission side memory circuit5by the system side is carried out. Also, the transmission side adaptive threshold control circuit6controls a line side access to the reception side memory circuit1by the line side by writing the line side flow control instruction signal in the transmission side memory circuit5in response to the transmission side flow control request signal from the reception side adaptive threshold control circuit2and by transmitting it to the line side. In addition, the transmission side adaptive threshold control circuit6inserts a line side pause frame into the transmission side memory circuit5, and outputs the pause frame to the line side.

FIG. 3is a block diagram showing the structure of the reception side adaptive threshold control circuit2. Referring toFIG. 3, the reception side adaptive threshold control circuit2is composed of a reception side pointer comparing circuit21, a reception side threshold setting data holding circuit22, a reception side adaptive difference control circuit23and a reception side flow control circuit24. A recording medium25for storing a program to be carried out by the reception side adaptive threshold control circuit2is connected thereto. It should be noted that the reception side adaptive threshold control circuit2may be constituted by a computer. Since the computer carry outs the program on the recording medium25, it is possible to attain the operations of the respective circuits.

The reception side pointer comparing circuit21compares the reception side write pointer supplied from the reception side write control circuit3with the reception side read pointer supplied from the reception side read control circuit4, and supplies the compared result as a reception side pointer difference to the reception side adaptive difference control circuit23. The reception side threshold setting data holding circuit22holds the threshold setting data received from the micro processor interface circuit9, and supplies the thresholds to the reception side adaptive difference control circuit23.

The reception side flow control circuit24outputs the system side flow control instruction signal to the reception side memory circuit1in response to the reception side flow control request signal supplied from the transmission side adaptive threshold control circuit6. Based on the reception side pointer difference, and the reception side thresholds, the reception side adaptive difference control circuit23outputs the reception side adaptive difference read control signal to the reception side read control circuit4, and the transmission side flow control request signal to the transmission side adaptive threshold control circuit6.

FIG. 4is a block diagram showing the structure of the transmission side adaptive threshold control circuit6. Referring toFIG. 4, the transmission side adaptive threshold control circuit6is composed of a transmission side pointer comparing circuit61, a transmission side threshold setting data holding circuit62, a transmission side adaptive difference control circuit63, a transmission side flow control circuit64, and a transmission side pause frame inserting circuit65. A recording medium66for storing a program to be carried out by the transmission side adaptive threshold control circuit6is connected thereto. It should be noted that the transmission side adaptive threshold control circuit6may be constituted by a computer. Since the computer carry outs the program of the recording medium66, it is possible to attain the operations of the respective circuits.

The transmission side pointer comparing circuit61compares the transmission side write pointer received from the transmission side write control circuit8with the transmission side read pointer received from the transmission side read control circuit7, and supplies the compared result as a transmission side pointer difference to the transmission side adaptive difference control circuit63. The transmission side threshold setting data holding circuit62holds the transmission side threshold setting data received from the micro processor interface circuit9, and supplies the transmission side thresholds to the transmission side adaptive difference control circuit63. The transmission side flow control circuit64supplies a line side flow control instruction signal to the transmission side memory circuit5in response to the transmission side flow control request signal received from the reception side adaptive threshold control circuit2. The transmission side pause frame inserting circuit65supplies a transmission side pause frame to the transmission side memory circuit5in response to the transmission side flow control request signal received from the reception side adaptive threshold control circuit2to request the stop of transmission to the line side.

The transmission side adaptive difference control circuit63outputs the transmission side adaptive difference read control signal to the transmission side read control circuit4based on the transmission side pointer difference, and the transmission side threshold data.

FIG. 5is a flowchart showing the reception side flow control of the LAN relaying apparatus according to the first embodiment of the present invention.FIGS. 6A and 6Bare flowcharts showing the transmission side flow control of the LAN relaying apparatus according to the first embodiment of the present invention.FIG. 7is a timing chart showing the read pointer adaptation control of the LAN relaying apparatus according to the first embodiment of the present invention. The adaptive flow control operation of the LAN relaying apparatus according to the first embodiment of the present invention will be described below with reference toFIGS. 2 to 7.

At first, the operation of the reception side will be described. The three kinds of the reception side thresholds (the reception side low threshold, the reception side middle threshold and the reception side high threshold) serving as the references of the reception side operation are preliminarily set in the reception side adaptive threshold control circuit2from the micro processor interface circuit9(Step S1ofFIG. 5). The line reception side input data signal supplied to the reception side memory circuit1is written to the reception side memory circuit1in response to the write control signal of the reception side write control circuit3, and the reception side write pointer (RWP) is supplied from the reception side write control circuit3to the reception side adaptive threshold control circuit2(Step S2ofFIG. 5).

The reception side adaptive threshold control circuit2compares the supplied reception side write pointer RWP with the reception side low threshold (Step S3ofFIG. 5). If the reception side write pointer RWP is equal to or greater than the reception side low threshold, the reception side adaptive threshold control circuit2starts the read process on the reception side. In this case, read start data on the reception side is supplied from the reception side adaptive threshold control circuit2to the reception side read control circuit4. The reception side read control signal is supplied from the reception side read control circuit4to the reception side memory circuit1, and a system reception side output data signal is read from the reception side memory circuit1. The reception side read pointer (RRP) is supplied from the reception side read control circuit4to the reception side adaptive threshold control circuit2(Step S4ofFIG. 5).

The reception side adaptive threshold control circuit2compares the difference (RWP−RRP) between the input reception side write pointer RWP and the reception side read pointer RRP with the reception side low threshold (Step S5ofFIG. 5). If the difference (RWP−RRP) between the reception side write pointer RWP and the reception side read pointer RRP is equal to the reception side low threshold, the reception side adaptive threshold control circuit2carry outs the normal memory access. Then, the operation flow advances to a step S6. If the difference (RWP−RRP) between the reception side write pointer RWP and the reception side read pointer RRP is not equal to the reception side low threshold, the reception side adaptive threshold read control process is carried out (Step S11ofFIG. 5), and the operation flow proceeds to the step S6.

Here, with reference toFIG. 7, in case of the write pointer0, a write operation is started from a time t0. A read operation of the read pointer0is started at a time t1when the reception side write pointer RWP is equal to or greater than the reception side low threshold. The reception side pointer difference (RWP−RRP) between the reception side read pointer and the reception side write pointer at the time t1is a reception side difference reference pointer.

If a write operation rate and a read operation rate are always equal to each other, this situation implies a stable situation in which the overflow and underflow do not occur (the inclinations of the write pointer0and the read pointer0are equal to each other). However, the write operation rate and the read operation rate are not always equal to each other because of a clock skew between the line side and the system side and a queuing process on the system side. For example, in case of the read pointer1, since the read operation rate is smaller than the write operation rate and the storage area of the memory is finite, the overflow necessarily occurs (the write pointer gets ahead of the read pointer). On the other hand, in case of the read pointer2, since the read operation rate is larger than the write operation rate, the underflow necessarily occurs (the read pointer gets ahead of the write pointer).

For these reasons, the read access is controlled so as not to bring about such problems. That is, the read access of the reception side read control circuit4is controlled based on an adaptive difference read control signal, using a difference pointer adaptation algorithm based on a reception side reference pointer difference pointer such that the reception side difference pointer (RWP−RRP) between the reception side write pointer and the reception side read pointer are always equal to the reception side difference reference pointer.

The reception side pointer comparing circuit21supplies the reception side pointer difference (RWP−RRP) between the reception side write pointer and the reception side read pointer to the reception side adaptive difference control circuit23. The reception side threshold setting data holding circuit22supplies the preset reception side low threshold supplied from the micro processor interface circuit9to the reception side adaptive difference control circuit23. The reception side adaptive difference control circuit23compares the reception side pointer difference (RWP−RRP) with the reception side low threshold, and outputs the reception side adaptive difference read control signal to the reception side read control circuit4so that the access rates relating to the read pointer and the write pointer on the reception side become constant.

The reception side adaptive threshold control circuit2compares the difference (RWP−RRP) between the reception side write pointer RWP and the reception side read pointer RRP with the reception side middle threshold (Step S6ofFIG. 5). If the pointer difference (RWP−RRP) between the reception side write pointer RWP and the reception side read pointer RRP is smaller than the reception side middle threshold, the reception side adaptive threshold control circuit2carries out the normal memory access (the operation flow proceeds to a step S7). If the difference (RWP−RRP) between the reception side write pointer RWP and the reception side read pointer RRP is equal to or greater than the reception side middle threshold, the reception side adaptive difference control circuit23outputs a transmission side flow control request signal. Thus, a line side flow control request transmission process is carried out (Step S12ofFIG. 5). Then, the operation flow proceeds to the step S7.

The reception side pointer comparing circuit21supplies the reception side pointer difference (RWP−RRP) between the reception side write pointer and the reception side read pointer to the reception side adaptive difference control circuit23. The reception side threshold setting data holding circuit22supplies the preset reception side middle threshold supplied from the micro processor interface circuit9to the reception side adaptive difference control circuit23. The reception side adaptive difference control circuit23compares the reception side pointer difference (RWP−RRP) with the reception side middle threshold, and outputs the transmission side flow control request signal to the transmission side adaptive threshold control circuit6, in order to protect the overflow from occurring in the reception side memory circuit1. The reception side adaptive threshold control circuit2compares the difference (RWP−RRP) between the reception side write pointer RWP and the reception side read pointer RRP with the reception side high threshold (Step S7ofFIG. 5). If the difference (RWP−RRP) between the reception side write pointer RWP and the reception side read pointer RRP is smaller than the reception side high threshold, the reception side adaptive threshold control circuit2carries out the normal memory access (the operation flow proceeds to a step S8). If the difference (RWP−RRP) between the reception side write pointer RWP and the reception side read pointer RRP is equal to or greater than the reception side high threshold, a line side compulsive end process is carried out (Step S13ofFIG. 5). Then, the operation flow proceeds to a step S8.

The reception side pointer comparing circuit21supplies the reception side pointer difference (RWP−RRP) between the reception side write pointer and the reception side read pointer to the reception side adaptive difference control circuit23. The reception side threshold setting data holding circuit22supplies the preset reception side high threshold supplied from the micro processor interface circuit9to the reception side adaptive difference control circuit23. The reception side adaptive difference control circuit23compares the reception side pointer difference (RWP−RRP) with the reception side high threshold. If the reception side pointer difference (RWP−RRP) is equal to or greater than the reception side high threshold, the reception side adaptive difference control circuit23outputs a reception side adaptive difference read compulsive end signal to the reception side read control circuit4, such that the overflow is caused in the reception side memory circuit1so that the read access to the reception side memory circuit1by the reception side read control circuit4is forcedly stopped.

The reception side adaptive threshold control circuit2checks the end of the reception side write process (Step S8ofFIG. 5), and carries out the normal memory access if the reception side write process is not ended (the operation flow proceeds to a step S9). If the reception side write process is ended, a reception side write end process is carried out (Step S14ofFIG. 5). Then, the operation flow proceeds to the step S9.

The reception side adaptive threshold control circuit2checks the end of the reception side read process (Step S9ofFIG. 4), and carries out the normal memory access if it is not ended (the operation flow proceeds to the step S5). If it is ended, a reception side read ending process is carried out (Step S15ofFIG. 4). Then, the reception side memory access is ended.

Also, when receiving the reception side flow control request signal, the reception side adaptive threshold control circuit2carries out a reception side adaptive threshold read control process in order to carry out the reception side flow control (Step S11ofFIG. 5). Then, the operation flow proceeds to the step S6.

When receiving the reception side flow control request signal from the transmission side adaptive threshold control circuit6to the reception side adaptive threshold control circuit2, the reception side flow control circuit24supplies the system side flow control instruction signal to the reception side memory circuit1in order to carry out the system side flow control. In the case of the normal reception side read access, the reception side read control signal is supplied from the reception side read control circuit4to the reception side memory circuit1, and is read out as the system reception side output data signal, and the reception side read pointer (RRP) is supplied from the reception side read control circuit4to the reception side adaptive threshold control circuit2.

In the case of the reception side read access needing the reception side adaptive threshold read process, the reception side read control signal which is adaptively controlled as necessary is supplied from the reception side read control circuit4to the reception side memory circuit1, and the system reception side output data signal is read out from the reception side memory circuit1. The reception side read pointer (RRP) is supplied from the reception side read control circuit4to the reception side adaptive threshold control circuit2.

In the case of the reception side read access needing the system side flow control, the system side flow control instruction signal is supplied from the reception side adaptive threshold control circuit4to the reception side memory circuit1, and is read out as the system reception side output data signal from the reception side memory circuit1. The reception side read pointer (RRP) is supplied from the reception side read control circuit4to the reception side adaptive threshold control circuit2.

In the case of the reception side read access needing the reception side compulsive end process, a reception side read control signal for carrying out a compulsive end on the reception side is supplied from the reception side adaptive threshold control circuit2to the reception side read control circuit4, and the reception side read access is forcedly ended.

Next, the operation of the transmission side will be described below. The three kinds of the transmission side thresholds (the transmission side low threshold, the transmission side middle threshold and the transmission side high threshold) serving as the reference of the transmission side operation are preliminarily set in the transmission side adaptive threshold control circuit6by the micro processor interface circuit9(Step S21ofFIG. 6A).

The system transmission side input data signal inputted to the transmission side memory circuit5is written to the transmission side memory circuit5by the write control signal of the transmission side write control circuit8, and the transmission side write pointer (TWP) is supplied from the transmission side write control circuit8to the transmission side adaptive threshold control circuit6(Step S22ofFIG. 6A).

The transmission side adaptive threshold control circuit6compares the input transmission side write pointer TWP with the transmission side low threshold (Step S23ofFIG. 6A). If the transmission side write pointer TWP is equal to or greater than the transmission side low threshold, the transmission side adaptive threshold control circuit6starts the read process on the transmission side.

Read start data on the transmission side is supplied from the transmission side adaptive threshold control circuit6to the transmission side read control circuit7. The transmission side read control signal is supplied from the transmission side read control circuit7to the transmission side memory circuit5, and a line transmission side output data signal is read out from the transmission side memory circuit5. The transmission side read pointer (TRP) is supplied from the transmission side read control circuit7to the transmission side adaptive threshold control circuit6(Step S24ofFIG. 6A).

The transmission side adaptive threshold control circuit6compares the difference (TWP−TRP) between the input transmission side write pointer TWP and the transmission side read pointer TRP with the transmission side low threshold (Step S25ofFIG. 6A). The transmission side adaptive threshold control circuit6carries out the normal memory access if the difference (TWP−TRP) between the transmission side write pointer TWP and the transmission side read pointer TRP is equal to the transmission side low threshold (the operation flow proceeds to a step S26). If the difference (TWP−TRP) between the transmission side write pointer TWP and the transmission side read pointer TRP is not equal to the transmission side low threshold, the transmission side adaptive threshold read control process is carried out (Step S31ofFIG. 6A). Then, it is judged whether or not a transmission side pause frame inserting process is needed (Step S32ofFIG. 6A). Here, if it is judged that the transmission side pause frame inserting process is not needed, the operation flow proceeds to the step S26. If it is judged that the transmission side pause frame inserting process is needed when the transmission side flow control request signal is supplied from the reception side adaptive threshold control circuit2to the transmission side adaptive threshold control circuit6, the line side pause frame insert signal is outputted from the transmission side adaptive threshold control circuit6to the transmission side memory circuit5, and then the pause frame is read out and transmitted to the line side. Subsequently, the operation flow proceeds to the step S26.

With reference toFIG. 7, in case of the write pointer0, a write operation is started from a time t0. A read operation of the read pointer0is started at a time t1when the transmission side write pointer TWP is equal to or greater than the transmission side low threshold. The transmission side pointer difference (TWP−TRP) between the transmission side read pointer and the transmission side write pointer at this time t1becomes a transmission side difference reference pointer.

If a write operation rate and a read operation rate are always equal to each other, this situation implies a stable situation in which the overflow and underflow do not occur (the inclinations of the write pointer0and the read pointer0are equal to each other).

However, the write operation rate and the read operation rate are not always equal to due to clock skew between the line side and the system side and a queuing process on the system side. For example, in case of the read pointer1, if the read operation rate is slower than the write operation rate and the storage area of the memory if finite, the overflow necessarily occurs (the write pointer gets ahead of the read pointer).

On the other hand, in case of the read pointer2, if the read operation rate is faster than the write operation rate, the underflow necessarily occurs (the read pointer gets ahead of the write pointer). The read access is controlled so as not to bring about such problems. Thus, the access of the transmission side read control circuit7is controlled based on the adaptive difference read control signal using a difference pointer adaptation algorithm from a transmission side reference pointer difference pointer in such a manner that the transmission side pointer difference (TWP−TRP) between the transmission side write pointer and the transmission side read pointer always coincide with the transmission side reference pointer difference.

The transmission side pointer comparing circuit61supplies the transmission side pointer difference (TWP−TRP) between the transmission side write pointer and the transmission side read pointer to the transmission side adaptive difference control circuit63. The transmission side threshold setting data holding circuit62supplies the preset transmission side low threshold supplied from the micro processor interface circuit9to the transmission side adaptive difference control circuit63. The transmission side adaptive difference control circuit63compares the transmission side pointer difference (TWP−TRP) with the transmission side low threshold. The transmission side adaptive difference control circuit63outputs the transmission side adaptive difference read control signal to the transmission side read control circuit7so that the access rates of the read pointer and write pointer on the transmission side become constant.

The transmission side adaptive threshold control circuit6compares the difference (TWP−TRP) between the input transmission side write pointer TWP and the transmission side read pointer TRP with the transmission side middle threshold (Step S26ofFIG. 6A). The transmission side adaptive threshold control circuit6carries out the normal memory access if the difference (TWP−TRP) between the transmission side write pointer TWP and the transmission side read pointer TRP is smaller than the transmission side middle threshold (the operation flow proceeds to a step S27). If the difference (TWP−TRP) between the transmission side write pointer TWP and the transmission side read pointer TRP is equal to or greater than the transmission side middle threshold, the reception side flow control request signal is outputted from the transmission side adaptive threshold control circuit6to the reception side adaptive threshold control circuit2. The reception side flow control instruction signal is written into the reception side memory circuit1by the reception side adaptive threshold control circuit2in response to the reception side flow control request signal, and is read out to the system side. In this way, a system side flow control process is carried out (Step S34ofFIG. 6A). Then, the operation flow proceeds to the step S27.

The transmission side pointer comparing circuit61supplies the transmission side pointer difference (TWP−TRP) between the transmission side write pointer and the transmission side read pointer to the transmission side adaptive difference control circuit63. The transmission side threshold setting data holding circuit62supplies the preset transmission side middle threshold from the micro processor interface circuit9to the transmission side adaptive difference control circuit63.

The transmission side adaptive difference control circuit63compares the transmission side pointer difference (TWP−TRP) with the transmission side middle threshold. The transmission side adaptive difference control circuit63outputs the reception side flow control request signal to the reception side adaptive threshold control circuit2, in order to protect the overflow from occurring in the transmission side memory circuit5.

The transmission side adaptive threshold control circuit6compares the difference (TWP−TRP) between the input transmission side write pointer TWP and the transmission side read pointer TRP with the transmission side high threshold. The transmission side adaptive threshold control circuit6carries out the normal memory access if the difference (TWP−TRP) between the transmission side write pointer TWP and the transmission side read pointer TRP is less than the transmission side high threshold (the operation flow proceeds to a step S28ofFIG. 6B). If the difference (TWP−TRP) between the transmission side write pointer TWP and the transmission side read pointer TRP is equal to or greater than the transmission side high threshold, a transmission side compulsive end process is carried out (Step S35ofFIG. 6A). The operation flow proceeds to the step S28ofFIG. 6B. The transmission side pointer comparing circuit61supplies the transmission side pointer difference (TWP−TRP) between the transmission side write pointer and the transmission side read pointer to the transmission side adaptive difference control circuit63. The transmission side threshold setting data holding circuit62supplies the preset transmission side high threshold from the micro processor interface circuit9to the transmission side adaptive difference control circuit63.

The transmission side adaptive difference control circuit63compares the transmission side pointer difference (TWP−TRP) with the transmission side high threshold. The transmission side adaptive difference control circuit63outputs a transmission side adaptive difference read compulsive end signal to the transmission side read control circuit7, in order to generate the overflow in the transmission side memory circuit5. The transmission side adaptive threshold control circuit6checks the end of the transmission side write process (Step S28ofFIG. 6B). The transmission side adaptive threshold control circuit6carries out the normal memory access if it is not ended (the operation flow proceeds to a step S29). If it is ended, a transmission side write end process is carried out (Step S36ofFIG. 6B). The operation flow proceeds to the step S29.

The transmission side adaptive threshold control circuit6checks the end of the transmission side read process (Step S29ofFIG. 6B), and carries out the normal memory access if it is not ended (the operation flow proceeds to the step S25ofFIG. 6A). If it is ended, a transmission side read end process is carried out (Step S37ofFIG. 6B). Then, the transmission side memory access is ended.

Also, when receiving the transmission side flow control request signal (Step S30ofFIG. 6A), the transmission side adaptive threshold control circuit6carries out a transmission side adaptive threshold read control process (Step S31ofFIG. 6A). Then, the transmission side adaptive threshold control circuit6judges whether or not the transmission side pause frame inserting process is needed (Step S32ofFIG. 6A). Here, when it is judged that the transmission side pause frame inserting process is needed, the transmission side pause frame inserting process is carried out (Step S33ofFIG. 6A). Then, the operation flow proceeds to the step S26.

When receiving the transmission side flow control request signal from the reception side adaptive threshold control circuit2to the transmission side adaptive threshold control circuit6, the transmission side flow control circuit64supplies the transmission side flow control instruction signal to the transmission side memory circuit5. The transmission side adaptive difference control circuit63outputs the transmission side adaptive difference read control signal to the transmission side read control circuit7, in order to carry out the transmission side flow control. The transmission side pause frame inserting circuit65inserts the transmission side pause frame into the transmission side memory circuit5, and requests the line side to stop the data transmission through the transmission side pause frame.

The transmission side adaptive difference read control signal is supplied from the transmission side adaptive threshold control circuit6to the transmission side read control circuit7. In the case of the normal transmission side read access, the transmission side read control signal is supplied from the transmission side read control circuit7to the transmission side memory circuit5. The line transmission side output data signal is read out from the transmission side memory circuit5. Then, the transmission side read pointer (TRP) is supplied from the transmission side read control circuit7to the transmission side adaptive threshold control circuit6.

In the case of the transmission side read access needing the transmission side adaptive threshold read process, the transmission side read control signal, which is adaptively controlled as necessary, is supplied from the transmission side read control circuit7to the transmission side memory circuit5. The line transmission side output data signal is read out from the transmission side memory circuit5. Then, the transmission side read pointer (TRP) is supplied from the transmission side read control circuit7to the transmission side adaptive threshold control circuit6.

In the case of the transmission side read access needing the transmission side flow control request process, the transmission side read control instruction signal is supplied from the transmission side adaptive threshold control circuit6to the transmission side memory circuit5. The line transmission side output data signal is read out from the transmission side memory circuit5. Then, the transmission side read pointer (TRP) is supplied from the transmission side read control circuit7to the transmission side adaptive threshold control circuit6.

In the case of the transmission side read access receiving the transmission side flow control request signal, the transmission side pause frame insert signal for inserting the pause frame on the transmission side is supplied from the transmission side adaptive threshold control circuit6to the transmission side memory circuit5. Then, the transmission side pause frame is inserted into the transmission side memory circuit5.

In the case of the transmission side read access needing the transmission side compulsive end process, a transmission side read end control signal for executing a compulsive end on the transmission side is supplied from the transmission side adaptive threshold control circuit6to the transmission side read control circuit7, and the transmission side read access is forcedly ended.

In this way, the reception side adaptive threshold control circuit2, the transmission side adaptive threshold control circuit6and the transmission side pause frame inserting circuit65are installed in the line processing section of the LAN relaying apparatus. Therefore, it is possible to carry out the adaptive difference read access control of the memory circuit which was conventionally difficult. Moreover, it is possible to carry out the stable memory access control, and as necessary, the flow control function of the line processing section.

FIG. 8is a block diagram showing a structure of a line processing section of a LAN relaying apparatus according to the second embodiment of the present invention. Referring toFIG. 8, the line processing section of the LAN relaying apparatus according to the second embodiment of the present invention is composed of a reception side memory circuit11, a reception side adaptive threshold control circuit12, a reception side write control circuit13, a reception side read control circuit14, a transmission side memory circuit15, a transmission side adaptive threshold control circuit16, a transmission side read control circuit17, a transmission side write control circuit18and a micro processor interface circuit19. Their operations are further devised.

That is, a reception side adaptive difference write control signal is supplied from the reception side adaptive threshold control circuit12to the reception side write control circuit13. A transmission side adaptive difference write control signal is supplied from the transmission side adaptive threshold control circuit16to the transmission side write control circuit18. Both of the reception side and the transmission side carry out the adaptive difference control on the write access operation. Consequently, the memory access control can be carried out.

In the second embodiment, the line processing section of the LAN relaying apparatus changes the control targets of the reception side adaptive threshold control circuit12and the transmission side adaptive threshold control circuit16to the write accesses. Thus, it is possible to carry out the adaptive difference write access control of the memory circuit, which was conventionally difficult. Hence, it is possible to carry out the stable memory access control.

FIG. 9is a block diagram showing a structure of a line processing section of a LAN relaying apparatus according to the third embodiment of the present invention. Referring toFIG. 9, the line processing section of the LAN relaying apparatus according to the third embodiment of the present invention is composed of a reception side memory circuit31, a reception side adaptive threshold control circuit32, a reception side write control circuit33, a reception side read control circuit34, a transmission side memory circuit35, a transmission side adaptive threshold control circuit36, a transmission side read control circuit37, a transmission side write control circuit38and a micro processor interface circuit39, similarly to the above-mentioned embodiments of the present invention. Their operations are further devised.

That is, a reception side adaptive difference read control signal is supplied to the reception side read control circuit34, and a reception side adaptive difference write control signal is supplied to the reception side write control circuit33from the reception side adaptive threshold control circuit32. A transmission side adaptive difference read control signal is supplied from the transmission side adaptive threshold control circuit36to the transmission side read control circuit37, and a transmission side adaptive difference write control signal is supplied from the transmission side adaptive threshold control circuit36to the transmission side write control circuit38. Then, both of the reception side and the transmission side perform the adaptive difference control on the read access operation and the write access operation. Consequently, the memory access control can be carried out.

In the third embodiment, the line processing section of the LAN relaying apparatus changes the control targets of the reception side adaptive threshold control circuit32and the transmission side adaptive threshold control circuit36to the read access and the write access. Thus, it is possible to carry out the adaptive difference read/write access control of the memory circuit, which was conventionally difficult. Hence, it is possible to carry out the stable memory access control.

In the above embodiments, the pause frame is inserted in the transmission side memory circuit5. However, the pause frame may be inserted in the reception side memory circuit1, in the same manner as the transmission side.

As mentioned above, according to the LAN relaying apparatus of the present invention, the line processing section includes the reception side memory circuit and the transmission side memory circuit in order to relay the data signal between the line and the system. When comparing the read pointer and the write pointer to the reception side memory circuit and detecting the increase or the decrease from the preset reference pointer difference signal, the line processing section carries out the access control to the reception side memory circuit, based on the increase or the decrease. When comparing the read pointer and the write pointer to the transmission side memory circuit and detecting the increase or the decrease from the preset reference pointer difference signal, the line processing section carries out the access control to the transmission side memory circuit based on the increase or the decrease. Thus, it is possible to carry out the adaptive difference read access control of the memory circuit. Hence, it is possible to carry out the stable memory access control, and as necessary, the flow control function of the line processing section.