1. Field of the Invention
The present invention relates to a method for transmitting data in a multi-chip system, and more particularly, to a method of transmitting data between a host chip and a slave chip.
2. Description of the Prior Art
As integrated circuit (IC) technologies are under rapid development, it is very common to see electronic systems having a multi-chip system frame. A multi-chip system normally includes at least a host chip engaged in controlling the operation of the system, and at least a slave chip engaged in executing servo control or detecting some particular signals. Normally, the host chip is a digital chip, and the slave chip is an analog chip. However, this arrangement is adjustable and not a restriction to the multi-chip system.
Take an optical disk drive for example. The task of the slave chip is to execute the servo control of the optical disk drive, and detect some particular signals, such as a tracking servo signal, a focusing servo signal, a tray open signal, a tray close signal, a disc blank signal, and a disc defect signal, etc. It is necessary for the host chip to obtain the above-described signals detected by the slave chip while controlling the operation of the optical disk drive.
According to conventional technologies, a common way for the host chip to obtain the signals is described as follows. The slave chip detects the states of some signals periodically, and stores these states in a register. As long as the states of the signals have changed, the slave chip will update the register. In addition, the host chip has to check the values held in the register actively and periodically so as to determine if the states of the signals have changed.
There are disadvantages in the conventional method, and one of these disadvantages is that the processor's resources are wasted if the host chip checks the register frequently. For ensuring the multi-chip system's performance, the frequency of checking the values held in the register cannot be low. However, this wastes the resources of the processor in the conventional multi-chip systems.
Besides, another conventional method for the host chip to obtain the states of signals is to implement pin pairs to each signal source needed to be monitored between the host chip and the slave chip so as to fulfill the purpose of data transmission. However, the quantity of the pin pairs increases as the number of signal sources need to be monitored increases, and this would cause an increase in the system cost.
It is therefore one of the many objectives of the present invention to provide a method for transmitting data in a multi-chip system for solving the above problems.
According to the claimed invention, a method for transmitting data in a multi-chip system is disclosed. The multi-chip system includes at least a host chip and at least a slave chip. The method includes the following steps: (a) the slave chip informing the host chip of data needed to be transmitted; (b) when being informed by the slave chip, the host chip informing the slave chip to start transmitting the data; and (c) when being informed by the host chip, the slave chip starting transmitting the data to the host chip.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after having read the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Please refer to
Step 210: If the slave chip 120 has any information to be delivered to the host chip 110, the slave chip 120 actively alters the voltage on the request pin pair 130 so as to inform the host chip 110 of data to be transmitted.
Step 220: The host chip 110 checks the voltage on the request pin pair 130 periodically, when the host chip 110 detects a voltage change of the request pin pair 130, or the host chip 110 is triggered by a positive edge or a negative edge of the voltage on the request pin pair 130, the host chip 110 delivers a clock signal to the slave chip 120 via the clock pin pair 160 (the clock signal is used for synchronizing).
Step 230: The host chip 110 informs the slave chip 120 to transmit data by altering the voltage on the latch pin pair 150.
Step 240: The slave chip 120 transmits the data to the host chip 110 via the data pin pair 140 on the basis of the clock signal of the clock pin pair 160.
Step 250: The host chip 110 decodes the data received from the slave chip 120 on the basis of the clock signal.
According to the present invention, the multi-chip system 100 can determine the data need to be transmitted in each clock cycle in advance. Take an optical disk drive for example. If the data to be transmitted in the first, second, third, fourth, fifth, and sixth clock cycles are respectively the tracking servo signal, focusing servo signal, tray open signal, tray close signal, disc blank signal, and disc defect signal, the host chip 110 can then obtain the following information: the state of the tracking servo signal is “1”, the state of the focusing signal is “1”, the state of the tray open signal is “1”, the state of the tray close signal is “0”, the state of the disc blank signal is “0”, and the state of the disc defect signal is “1”. In addition, the host chip 110 can record the states of the signals previously received from the slave chip 120, and use a counter and a comparator to determine which signal (or signals) has changed.
In comparison with the prior art method, the slave chip of the present invention actively makes a request for transmitting data, and it is not necessary for the host chip to check the register periodically. Consequently, the resources of the multi-chip system are not wasted. In addition, the present invention uses less pin pairs than the prior art method, and can transmit a plurality of signal sources by means of decoding.
Those skilled in the art will readily appreciate that numerous modifications and alterations of the device may be made without departing from the scope of the present invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
093102047 | Jan 2004 | TW | national |