CIRCUIT HAVING A PLURALITY OF MODES
20210058079 ยท 2021-02-25
Inventors
Cpc classification
H03K5/135
ELECTRICITY
H03K2005/00013
ELECTRICITY
International classification
H03K5/15
ELECTRICITY
H03K5/135
ELECTRICITY
H03K5/156
ELECTRICITY
Abstract
The present invention provides a circuit having a plurality of modes, wherein the circuit includes a first circuit, a second circuit, a first multiplexer, a second multiplexer and a specific flip-flop. In the operations of the circuit, the first circuit is configured to generate a first signal, the second circuit is configured to generate a second signal, the first multiplexer is configured to output one of the first signal and the second signal according to a mode selection signal, the second multiplexer is configured to output one of a first clock signal and a second clock signal according to the mode selection signal, and the specific flip-flop is configured to sample the first signal or the second signal outputted by the first multiplexer by using the first clock signal or the second clock signal outputted by the second multiplexer to generate an output signal.
Claims
1. A circuit having a plurality of modes, comprising: a first circuit, arranged to generate a first signal; a second circuit, arranged to generate a second signal; a first multiplexer, coupled to the first circuit and the second circuit, arranged to output one of the first signal and the second signal according to a mode selection signal; a second multiplexer, arranged to output one of a first clock signal and a second clock signal according to the mode selection signal; and a specific flip-flop, coupled to the first multiplexer and the second multiplexer, arranged to sample the first signal or the second signal outputted by the first multiplexer by using the first clock signal or the second clock signal outputted by the second multiplexer to generate an output signal.
2. The circuit of claim 1, wherein the first clock signal and the second clock signal have different phases.
3. The circuit of claim 2, wherein the first circuit comprises: a first flip-flop; and a logical circuit, arranged to generate the first signal according to an output signal of the first flip-flop; and the second circuit comprises: a second flip-flip, arranged to generate the second signal.
4. The circuit of claim 3, wherein the phase of the first clock signal lags behind the phase of the second clock signal; and when the mode selection signal indicates a first mode, the first multiplexer outputs the first signal, and the second multiplexer outputs the first clock signal to the specific flip-flop; and when the mode selection signal indicates a second mode, the first multiplexer outputs the second signal, and the second multiplexer outputs the second clock signal to the specific flip-flop.
5. The circuit of claim 4, wherein the first mode is a functional mode, and the second mode is a test mode.
6. The circuit of claim 4, further comprising: a delay circuit, arranged to delay a reference clock signal to generate the first clock signal; wherein the delay circuit is used to make the specific flip-flop be able to meet a setup time margin.
7. The circuit of claim 6, wherein delay amount of a path between the second flip-flop and the first multiplexer is less than delay amount of the delay circuit.
8. The circuit of claim 6, wherein there is no delay circuit between the second flip-flop and the first multiplexer.
9. The circuit of claim 6, wherein the reference clock signal serves as the second clock signal.
10. The circuit of claim 3, wherein the first flip-flop and the second flip-flop receive the same clock signals.
11. A signal processing method applied to a plurality of modes, comprising: using a first circuit to generate a first signal; using a second circuit to generate a second signal; outputting one of the first signal and the second signal according to a mode selection signal; outputting one of a first clock signal and a second clock signal according to the mode selection signal, wherein the first clock signal and the second clock signal have different phases; and using a specific flip-flop to sample the first signal or the second signal by using the first clock signal or the second clock signal to generate an output signal.
12. The signal processing method of claim 11, wherein the first clock signal and the second clock signal have different phases.
13. The signal processing method of claim 12, wherein the first circuit comprises: a first flip-flop; and a logical circuit, arranged to generate the first signal according to an output signal of the first flip-flop; and the second circuit comprises: a second flip-flip, arranged to generate the second signal.
14. The signal processing method of claim 13, wherein the phase of the first clock signal lags behind the phase of the second clock signal; and the step of using the specific flip-flop to sample the first signal or the second signal by using the first clock signal or the second clock signal to generate the output signal comprises: when the mode selection signal indicates a first mode, using the specific flip-flop to sample the first signal by using the first clock signal to generate the output signal; and when the mode selection signal indicates a second mode, using the specific flip-flop to sample the second signal by using the second clock signal to generate the output signal.
15. The signal processing method of claim 14, wherein the first mode is a functional mode, and the second mode is a test mode.
16. The signal processing method of claim 14, further comprising: delaying a reference clock signal to generate the first clock signal; wherein the delaying step is used to make the specific flip-flop be able to meet a setup time margin.
17. The signal processing method of claim 16, wherein the reference clock signal serves as the second clock signal.
18. The signal processing method of claim 13, wherein the first flip-flop and the second flip-flop receive the same clock signals.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0007]
[0008]
[0009]
DETAILED DESCRIPTION
[0010]
[0011] In the operations of the circuit 100, if the circuit 100 operates in the functional mode (e.g., the circuit 100 has been used in the electronic device and begins to function properly), other components within the circuit 100 will generate a mode selection signal VS to the first multiplexer 130 to select and output a first signal D1 generated by the first circuit 110. Referring to
[0012] If the circuit 100 operates in the test mode (e.g., the circuit 100 is under test in the factory and has not been applied to the electronic device), other components within the circuit 100 will generate the mode selection signal VS to the first multiplexer 130 to select and output a second signal D2 generated by the second circuit 120. In this embodiment, the second flip-flop 122 of the second circuit 120 uses the reference clock signal CK to sample a signal D_T to generate the second signal D2, and there is no delay circuit between the second flip-flop 112 and the first multiplexer 130. Therefore, because the first signal D1 generated by the first circuit 110 and the second signal D2 generated by the second circuit 120 have different path delays, the specific flip-flop 150 using the first clock signal CK1 (i.e., the delayed clock signal) to sample the second signal D2 may cause insufficient hold time margin. Therefore, the second multiplexer 140 refers to the mode selection signal VS to select and output the second clock signal CK2, for the specific flip-flop 150 using the second clock signal CK2 to sample the second signal D2 to generate the output signal Dout. In this embodiment, without a limitation of the present invention, the reference clock signal CK can serve as the second clock signal CK2. In other embodiments, as long as the phase of the first clock signal CK1 lags behind the phase of the second clock signal CK2, and the first clock signal CK1 and the second clock signal CK2 have the same frequency, the first clock signal CK1 and the second clock signal CK2 can be generated by using different methods.
[0013] In the embodiment shown in
[0014] In light of above, when the specific flip-flop 150 receives the signal passing through a path with larger delay amount (e.g. the first signal D1), the specific flip-flop 150 will use the clock signal that is delayed by a larger delay amount (e.g. the first clock signal CK1) to sample the received signal, to meet the requirements of the setup time margin. In addition, when the specific flip-flop 150 receives the signal passing through a path with less delay amount (e.g. the second signal D2), the specific flip-flop 150 will use the clock signal that is delayed by a less delay amount (e.g. the second clock signal CK2) to sample the received signal, to meet the requirements of the hold time margin. Therefore, the circuit 100 can meet the setup time margin and the hold time margin in the different modes, and only the second multiplexer 140 and the delay circuit 160 having smaller chip area are required to be added to the circuit 100, to save the manufacturing cost.
[0015]
[0016] Step 300: the flow starts.
[0017] Step 302: use a first circuit to generate a first signal.
[0018] Step 304: use a second circuit to generate a second signal.
[0019] Step 306: output one of the first signal and the second signal to a specific flip-flop according to a mode selection signal.
[0020] Step 308: output one of a first clock signal and a second clock signal to a specific flip-flop according to the mode selection signal, wherein the first clock signal and the second clock signal have different phases.
[0021] Step 310: use the specific flip-flop to sample the first signal or the second signal by using the first clock signal or the second clock signal to generate an output signal.
[0022] Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.