Waveform shaping circuit and digital signal analyzing apparatus using the same

Abstract: A waveform shaper includes a level shifter (112) for controlling a DC offset voltage of an input digital signal, a comparator (103) for comparing a digital signal output from the level shifter with a predetermined reference voltage to shape a waveform of the input digital signal and output a shaped digital signal, an intermediate voltage detector (113) for detecting and outputting an intermediate voltage of a digital signal output from the level shifter, and a first controller (116, 117) for receiving the intermediate voltage and the predetermined reference voltage to output a control signal for changing the DC offset voltage to the level shifter. A signal analyzer includes, in addition to the above waveform shaper, a variable delay circuit (106) for delaying a phase of an input clock signal, a discriminator (104) for receiving an output from the comparator and an output from the variable delay circuit to determine a code of the output signal from the comparator at a timing determined by a delayed clock signal, an error measuring unit (121) for comparing a determination signal from the discriminator with a reference signal corresponding to the input digital signal to output an error signal, and a second controller (126) for receiving an output from the error measuring unit, detecting an intermediate delay amount of delay amounts corresponding to adjacent error signals having maximum values, and sending the intermediate delay amount to the variable delay circuit.

Description: The present invention relates to a digital signal analyzing apparatus, such as a logic analyzer or an error measuring apparatus, for analyzing a data signal input in synchronism with a clock signal by using the digital signal waveform shaping circuit. In general, in the above digital signal analyzing apparatus, when a digital signal received from an external circuit is analyzed, a waveform shaping circuit using a comparator is conventionally not utilized to perform wrong binary determination caused by an offset and noise components superposed on a digital signal. In the waveform shaping circuit of this type, an operating point of a comparator used in the waveform shaping circuit must be set to be an ideal and stable operating point free from the offset of an input digital signal and an influence of noise. For this reason, the following conventional methods are used: (1) a technique of manually setting a threshold value level of the comparator in an optimal state while an output waveform of the comparator is monitored; (2) a technique of inputting an input digital signal to the comparator through a capacitor; and (3) a technique of manually changing the DC average level of the input digital signal to a predetermined level using a level shifter to input the digital signal to the comparator. However, according to the techniques (1) and (3), the manual setting operation of the operating point is cumbersome, and the setting operation must be performed every time the level or offset of the input signal is changed. According to the technique (2), since the offset voltage of the digital signal input to the comparator is changed in accordance with a mark ratio (a ratio of the number of all generated bits to the number of marks included in the bits) of the input digital signal, waveform shaping is not reliably performed at a fixed threshold value. For this reason, another technique of inputting an intermediate voltage between the high "H" and low "L" level voltages of an input digital signal to the comparator as a threshold value may be used. However, when the input digital signal has a very high frequency (several GHz), the in-phase input range of the comparator is extremely narrow (e.g., ±1V). When the offset voltage of the input digital signal exceeds the in-phase input range, the comparator is saturated, and a normal waveform shaping operation can not be performed. A digital analyzing apparatus such as a logic analyzer or an error (rate) measuring apparatus using the above known waveform shaping circuit is generally arranged as shown in Fig. 22. That is, a data signal to be measured input to an input terminal 1 and a reference voltage Vr from a reference voltage generator 2 are input to a comparator 3, and a binary digital signal from which waveform distortion or a noise component are removed by the comparator 3 is input to the data input terminal (to be referred to as a D terminal) of a discriminator 4 constituted by a D flip-flop. A clock signal input to an input terminal 5 is input to the clock terminal (to be referred to as a CP terminal) of the discriminator 4 through a variable delay circuit 6. Therefore, binary discrimination of the digital signal from the comparator 3 is performed at a rise timing of the clock signal, the determination output and the clock signal are input to a data signal analyzer 7, and a predetermined data analysis is performed. However, since the level of the data signal to be measured and the phase of the clock signal are not known, before the normal data analyzing operation, the value of the reference voltage and the delay amount of the clock signal must be set to optimal values with respect to the data signal in advance. For this reason, in a conventional technique, the data signal to be measured shown in Fig. 23A is displayed on an oscilloscope, and the reference voltage Vr is adjusted to be positioned at an almost center point (point having a maximum noise margin of an eye-pattern) of the amplitude of the data signal to be measured. Thereafter, an output signal from the comparator 3 shown in Fig. 23B and a clock signal shown in Fig. 23C are displayed on a two-channel oscilloscope, and the delay amount of the variable delay circuit 6 is manually adjusted such that the rise timing (discrimination timing of the discriminator 4) of the clock signal is positioned closely to an intermediate point (having a maximum phase margin) between state transition points I and II of the digital signal. When the delay amount is manually adjusted as described above, the delay amount depends on the individual different of operators, thereby varying the analysis result. When the above adjustment is performed by observing the waveform using an oscilloscope, not only connections between devices are cumbersome, but the waveform is distorted by connecting the oscilloscope to cause an erroneous operation. For this reason, a method of connecting a monitor terminal for observing a waveform may be used. However, waveform observing equipment such as an oscilloscope must be prepared as usual, which is very inconvenient. It is, therefore, an object of the present invention to provide a signal analyzing apparatus using an improved waveform shaping circuit which can perform a simple and reliable waveform shaping operation even in a very high frequency region. According to the present invention, there is provided a signal analyzing apparatus as defined in claim 1. According to a preferred embodiment the waveform shaping circuit comprises a level shifter for changing an average DC offset voltage of an input digital signal, a comparator for comparing a digital signal output from the level shifter with a predetermined threshold voltage to output a waveform-shaped digital signal, a maximum value detector for detecting a maximum value of the digital signal from the level shifter, a minimum value detector for detecting a minimum value of the digital signal form the level shifter, and a subtractor for subtracting a center value between the maximum value from the maximum value detector and the minimum value from the minimum value detector from the predetermined threshold value to output an error signal corresponding to the subtraction result to the level shifter, thereby controlling a shift amount of the level shifter such that the center value is close to the predetermined threshold value. With this waveform shaping circuit, the center value of the digital signal input from the level shifter to the comparator is always controlled to be close to the predetermined threshold value of the comparator independently of an offset of the input signal, and a waveform-shaped digital signal is output from the comparator. According to another embodiment the digital signal analyzing apparatus comprises a discriminator for discriminating a logic state of a binary digital signal output from a comparator at a discrimination timing synchronized with a clock signal, a variable delay circuit for delaying the clock signal input to the discriminator by a delay amount corresponding to a control signal, and delay amount setting means for detecting a delay amount for positioning the discrimination timing between adjacent state transition points of the binary digital signal on the basis of an analysis result obtained by changing the delay amount of the variable delay circuit within a predetermined range so as to set the detected delay amount in the variable delay circuit. This invention can be more fully understood from the following detailed description of embodiments when taken in conjunction with the accompanying drawings, in which: Fig. 1 is a block diagram showing a circuit arrangement; Figs. 2A to 2C are circuit diagrams showing different main parts; Fig. 3 is a timing chart for explaining the operation of a first embodiment; Fig. 4 is a block diagram showing a modification of the circuit of Fig. 1; Figs. 5A, 5B, 5C, and 6 are circuit diagrams showing main parts of other modifications; Fig. 7 is a block diagram showing an arrangement of the second embodiment of the present invention; Figs. 8A and 8B are a circuit diagram and a perspective view, respectively, showing an arrangement of a main part of the second embodiment; Fig. 9 is a timing chart for explaining an operation of the second embodiment; Figs. 10(f) to 10(h) are views for explaining the operation of the second embodiment; Fig. 11 is a block diagram showing main parts of modifications of the second embodiment of the present invention; Figs. 12 to 20 are block diagrams showing arrangements of several embodiments of the present invention; Fig. 21 is a block diagram showing an error measuring unit; Fig. 22 is a block diagram showing an arrangement of a conventional signal analyzing apparatus; and Figs. 23A, 23B, and 23C are views for explaining an adjusting operation of the conventional signal analyzing apparatus. Reference will now be made in detail to the presently preferred embodiments of the invention as illustrated in the accompanying drawings, in which like reference characters designate like or corresponding parts throughout the several drawings. The first embodiment of the present invention makes use of a shaping circuit as described with reference to Figs. 1 to 6. Fig. 1 is a circuit diagram showing an arrangement of a waveform shaping circuit as part of the first embodiment of the present invention. In Fig. 1, a level shifter 1 changes an average DC (offset) voltage level of an input digital signal pulled down to an input resistor R 0 (e.g., 50Ω) in accordance with the magnitude of an error signal Ve (to be described later). The level shifter 1, as shown in Fig. 2A, is arranged such that an adder 2 adds the error signal to the average voltage of the input digital signal detected by an integrator constituted by a resistor R 1 and a capacitor C 1 and that the added voltage is added to an input digital signal, the DC component of which is blocked by a capacitor R2. Each of the resistors R 1 and R 2 has a high resistance of about several tens KΩ, which does not influence a transmission impedance of 50Ω. In Fig. 1, a maximum value detector 3 detects the peak value of the maximum voltage of an output signal from the level shifter 1. The maximum value detector 3, as shown in Fig. 2B, is constituted by a diode detector (detecting a waveform in a positive voltage direction) 3a. A minimum value detector 4 detects the peak value the minimum voltage of the output signal from the level shifter 1. The minimum value detector 4, as shown in Fig. 2B, as in the maximum value detector 3, is constituted by a diode detector (detecting a waveform in a negative voltage direction) 4a. Outputs from the detectors 3 and 4 are connected to the two ends of series-connected resistors R 3 and R 4 having equal resistances indicated as a center voltage detecting section (CVD) in Fig. 2B. Note that an intermediate voltage detecting section (IVD) is constituted by the detectors 3 and 4 and the resistors R 3 and R 4 . A comparator 6 outputs a high- ("H") level digital signal when the level of an output signal supplied from the level shifter 1 to an input terminal IN of the comparator 6 is higher than that of a predetermined threshold value voltage Vr applied to an input terminal REF of the comparator 6. When the level of the output signal is lower than that of the threshold value voltage Vr, the comparator 6 outputs a low- ("L") level digital signal. The comparator 6 is constituted by a very-high-frequency semiconductor element (e.g., a gallium arsenide FET) or the like. A subtractor 7, as shown in Fig. 2B, is constituted by a differential amplifier 7a and a feedback resistor 7b. The subtractor 7 subtracts an center voltage (intermediate voltage) V 0 between the output from the maximum value detector 3 and the output from the minimum value detector 4 from the threshold voltage Vr of the comparator 6. The center voltage V 0 is output from the connection point between the resistors R 3 and R 4 . A low-pass filter 8 determines response characteristics of an output from the subtractor 7 with respect to the level shifter 1. The low-pass filter (LPF) 8, as shown in Fig. 2B, comprises an integrator constituted by a resistor 8a and a capacitor 8b. A control section CONT for controlling the level shifter 1 is constituted by the subtractor 7 and the low-pass filter 8. The maximum value detector 3 and the minimum value detector 4 shown in Fig. 2B will be described below. In the maximum value detector 3, the positive voltage direction diode detector 3a includes a forward-biased diode 3b and a capacitor 3c which are connected in series between the output terminal of the level shifter 1 and ground. In addition, the detector 3a includes a constant current source 3d connected between the connection point of the diode 3b and the capacitor 3C and the a negative power source -V. In the minimum value detector 4, the negative voltage direction diode detector 4a includes a reverse-biased diode 4b and a capacitor 4c which are connected in series between the output terminal of the level shifter 1 and the ground. In addition, the detector 4a includes a constant current source 4d connected between the connection point of the diode 4b and the capacitor 4c and a positive power source +V. In the diode detectors 3a and 4a, the constant current sources 3d and 4d applies a small forward-biasing current of, e.g., about 1 µA, to each of the diodes 3b and 4b. In this case, the detector 3a detects a high-level voltage (maximum value), which is larger than the negative power source -V, of the digital signal output from the level shifter, and the detector 4a detects a low-level voltage (minimum value) smaller than the positive power source +V output. The capacitors 3c and 4c hold the maximum and minimum values, respectively. The capacitance of each of the capacitors 3c and 4c is set to be a value of, e.g., about 1,000 pF enough to hold a digital signal having a repetition period of 1 kHz or more, since a forward-biasing current supplied to each of the diodes 3b and 4b is 1 µA. In this case, the forward-biasing current to each of the diodes 3b and 4b has a small current value which rarely influences the input digital signal, and this current value is set as a current value required for a detecting operation of each of the diodes 3b and 4b. Fig. 2C shows still another shaping circuit for use in the first embodiment of the present invention. In Fig. 2C, an intermediate voltage detecting section IVD is the same as that of Fig. 2B, and the subtractor 7 and the low-pass filter 8 of Fig. 2B are replaced with a control section CONT constituted by an integrating operational amplifier 7d including an operational amplifier 7b and an integrating capacitor 7c. In addition, a level shifter 1 of Fig. 2C includes the two differential amplifiers la and 1b as the adder 2 of Fig. 2A. Each of the differential amplifiers la and 1b has a gain of 1. An operation of a waveform shaping circuit having the above arrangement will be described below. It is assumed that a center value (intermediate value) between the maximum and minimum values of a digital signal input to the level shifter 1 at time to in Fig. 3(a) is equal to the threshold value voltage Vr of the comparator 6. In this case, since an output from the subtractor 7 becomes 0, the digital signal input to the level shifter 1 is directly input to the comparator 6 and compared with the threshold value voltage Vr, thereby performing a waveform shaping operation. At time t 1 , as shown in (a) of Fig. 3, it is assumed that a DC offset voltage of the digital signal input to the level shifter 1 is increased stepwise. As shown in (b) of Fig. 3, the output signal from the level shifter 1 is increased, and, as shown in (c) and (d) of Fig. 3, the output voltages of the maximum value detector 3 and the minimum value detector 4 are changed stepwise. For this reason, as shown in (e) of Fig. 3, the center voltage (intermediate voltage) V 0 input to the subtractor 7 is changed stepwise, and the output from the subtractor 7 is changed in a negative direction as shown in (f) of Fig. 3. Therefore, since the subtracted output is integrated, an error signal Ve supplied from the subtractor 7 to the level shifter 1 through the low-pass filter 8, as shown in (g) of Fig. 3, is gradually decreased. For this reason, since a shift amount of the level shifter is gradually increased in the negative direction, the digital signal input to the comparator 6 through the level shifter 1 is changed such that the intermediate value of the digital signal becomes equal to the threshold value Vr, as shown in (b) of Fig. 3. As a result, at time t 2 , a difference between the input voltage to the subtractor 7 and the threshold value Vr becomes almost 0. Subsequently, this stable state is continued, and the digital signal having a reliably shaped waveform is obtained from the output terminal of the comparator 6. In this circuit, a loop for controlling the shift amount of the level shifter 1 is always closed. However, the loop need not always be closed. For example, as shown in Fig. 4, a holding circuit 10 for receiving a hold signal (stop signal) and holding the magnitude of the error signal and switches 11 and 12 (detector stop means) turned on by the hold signal (stop signal) to apply reverse-biasing voltages V(+) and V(-) to the maximum value detector 3 and the minimum value detector 4 are arranged. In the arrangement in Fig. 4, after the loop is set in an equilibrium state and the shift amount of the level shifter 1 becomes an appropriate amount with respect to a digital signal input to the level shifter 1, the hold signal (stop signal) is input. Subsequently, the shift amount of the level shifter 1 is fixed to an optimal amount, and the detecting operations of the detectors 3 and 4 are stopped so as to substantially open the control loop. As a result, degradation of high-frequency characteristics easily caused by always setting the detectors 3 and 4 in an operating state can be prevented. As shown in Figs. 5A, 5B and 5C when the reverse-biasing voltages V(+) and V(-) are selectively set to predetermined voltages, the detectors 3 and 4 can be advantageously used as limiter circuits for protecting the input to the comparator 6. In this modification, a limiter diode which may degrade high-frequency characteristics need not be additionally arranged. The same reference numerals as in Figs. 1, 2A, 2B, 2C and 4 denote the same parts in Fig. 5A, and a description thereof will be omitted. In Fig. 5A, a switching circuit SW is additionally arranged. The switching circuit SW includes interlocked switches 11A and 12A for performing a switching operation between an normal mode (NORMAL) and a hold/limiter mode (HOLD/LIMITER) in response to a switch signal. In the normal mode (NORMAL), the diodes 3b and 4b receive the above small forward-biasing currents from positive and negative power sources +V2 and -V2 to detect maximum and minimum values, respectively. In the hold mode (HOLD), since voltages (e.g., ±V1 = ±4 V) sufficiently larger than the maximum and minimum values of the input digital signal are set as positive and negative power sources +V1 and -V1, the diodes 3b and 4b are reversely biased, and the detecting operations of the maximum and minimum values are stopped as described above. In the limiter mode (LIMITER), since voltages (e.g., ±V1 = ±1.3 V) each including a prospective forward-biasing voltage drop of 0.7 V in the diodes 3b and 4b are set as the positive and negative power sources +V1 and -V1, the input digital signals can be limited to voltages of ±2 V by the diodes 3b and 4b. As described above, since the voltages set as the positive and negative power sources +V1 and -V1 are controlled to predetermined voltages of ±V = ±4 V or ±V1 = ±1.3 V in accordance with conditions, the hold mode or the limiter mode can be selectively used together with the above normal mode. In Fig. 5A, reference symbols 3e and 4e denote buffer amplifiers. Fig. 5B is view showing a case wherein the diodes 3b and 4b are operated as limiters in normal and hold modes. In Fig. 5B, as in Fig. 5A, forward-biasing voltages are applied to the diodes 3b and 4b by the power source +V2 and -V2 in the normal mode (NORMAL) to detect the maximum and minimum values of the input digital signal. In the normal mode, when an output voltage from the level shifter 1 becomes lower than a voltage of -2 V (-V4 - 1.4 V), a current flows through the diode 4b and a diode 4f which is newly arranged, and the limiter is operated at a voltage of -2 V. In the normal mode, when the output voltage from the level shifter 1 becomes higher than a voltage of +2 V (+V4 + 1.4 V), a current flows through the diode 3b and a diode 3f which is newly arranged, and the limiter is operated at a voltage of +2 V. In the above cases, the voltage -1.4 V is a voltage drop of the diodes 4b and 4f, and +1.4 is a voltage drop of the diodes 3b and 3f. In Fig. 5B, as in Fig. 5A, in the hold mode (HOLD), reverse-biasing voltages are applied to the diodes 3b and 4b by positive and negative power sources +V2 and -V2 to stop detecting operations of the maximum and minimum values of the input digital signal. In the hold mode, since voltages (e.g., ±V2 = ±1.3 V) each including a prospective forward-biasing voltage drop of 0.7 V in the diodes 3b and 4b are set as the positive and negative power source +V2 and -V2, when the output voltage from the level shifter 1 becomes lower than -2 V or higher than +2 V, as in the above normal mode, the limiter is operated at a voltage of -2 V or +2 V. In Fig. 5C, an A/D converter 10a, a memory 10b, a D/A converter 10c, and a switch 10d interlocked with the switches 11A and 12A are arranged in the holding circuit 10 shown in Fig. 5A such that digital holding is performed in consideration of stability for several hours or more in the hold mode (HOLD). In the above circuit, if the shift amount of the level shifter 1 needs to be known, the shift amount of the level shifter 1 can be known as follows. The magnitude of the error signal Ve is measured by a voltmeter, or a difference between average DC voltages of the input and output of the level shifter 1 detected by an integrator constituted by a resistor R 5 and a capacitor C 5 as in Fig. 6 is measured by a voltmeter 15. In addition, the threshold level of the input digital signal can be known by this shift amount. Furthermore, in the arrangement shown in Fig. 5C, since the shift amount of the level shifter 1 can be detected by the A/D converter 10a, the circuit as shown in Fig. 6 can be omitted. The waveform shaping circuit for a very high frequency is described in the above. However, the waveform shaping circuit can be used for low frequencies. Not only the comparator constituted by the gallium arsenide FET but a comparator constituted by a silicon bipolar transistor or hetero bipolar transistor (HBT) can be used. In addition to the level shifter having the above arrangement, a level shifter such as a level shifter constituted by a DC current blocking capacitor and a high frequency blocking coil can be used. In the signal analyzing apparatus making use of the waveform shaping circuit according to the first embodiment, since the shift amount of the level shifter is automatically controlled such that the DC offset voltage of the input digital signal, i.e., the center value between the maximum and minimum values of the output signal from the level shifter is close to a predetermined threshold value, an amplitude center value of the digital signal input to the comparator is always equal to the predetermined threshold value without cumbersome manual adjustment, and a waveform shaping operation can be reliably performed. In a waveform shaping circuit including a holding circuit for holding the magnitude of an error signal with respect to a level shifter and a detector stopping means for stopping the operations of a maximum value detector and a minimum value detector, an shift amount can be fixed to an appropriate value, thereby advantageously preventing the degradation of the high-frequency characteristics of a signal path. A second embodiment of the present invention also using the above waveform shaping circuit will be described below with reference to the accompanying drawings. Fig. 7 is a block diagram showing an arrangement in which a digital signal analyzing device according to the second embodiment is applied to an error measuring unit. In Fig. 7, a level shifter 112 changes the DC average (offset) voltage of a data signal to be measured in accordance with the magnitude of an error signal Ve (to be described later). The data signal is input from an input terminal 111 and pulled down to an input resistor R 0 (e.g., 50 Ω). As in Fig. 2A, as shown in Fig. 8A, the level shifter 112 is constituted as follows. An adder 112a adds an error signal to the average voltage of the data signal to be measured detected by an integrator constituted by a resistor R 1 and a capacitor C 1 , and the added voltage is added to the data signal to be measured through a resistor R 2 . In this case, the DC component of the data signal to be measured is blocked by a capacitor C 2 . Note that each of the resistors R 1 and R 2 has a high resistance of about several tens kΩ, which does not influence a transmission impedance of 50Ω. In an intermediate voltage detector circuit 113 shown in Fig. 7, a high- (H) level peak detector 114 and a low- (L) level peak detector 115 detect the high- (H) and low- (L) level peak voltages of a signal output from the level shifter 112, and an intermediate voltage V 0 between the peak voltages is output from a connection point between the two resistors R 3 and R 4 having the same resistance. An output signal from the level shifter 112 and a reference voltage Vr from a reference voltage generator 102 are input to a comparator 103. Reference numeral 116 denotes a subtractor for detecting a difference between the reference voltage Vr and the intermediate voltage V 0 , and reference numeral 117 denotes a low-pass filter (to be referred to as an LPF hereinafter) for integrating the subtracted output from the subtractor 116 to output an error signal to the level shifter 112. The above arrangement makes use of the waveform shaping circuit and the detailed arrangements thereof as used in the first embodiment. Reference numeral 119 denotes an A/D converter for converting an output from the LPF 117, i.e., a shift amount of the level shifter 112, into a digital value. An clock signal input to an input terminal 120 is input to a discriminator 104 and an error measuring unit 121 through a variable delay circuit 106 (to be described later). The error measuring unit 121 serving as a date analyzer of the error measuring apparatus of this embodiment is arranged as follows. That is, a error detector 123 determines whether an output from a discriminator 104 is equal to reference data (having the same pattern as that of data to be measured) output from a reference pattern generator 122 in response to a clock signal output from a variable delay circuit 106, the number of noncoincidence signals output from the comparator 123 is counted by a error counter 124, and the number of clock signals is counted by the clock counter 125. A controller 126 of the error measuring apparatus is constituted by a microprocessor (CPU) or the like for performing a conventional measuring process and an optimal delay amount detecting process. In the conventional measuring process, the error counter 124 and the clock counter 125 are simultaneously operated for a predetermined time by a gate signal, the CPU reads the counter values to calculate a digital error rate, and the obtained result is displayed on a display 127. In the optimal delay amount detecting process, error rate data with respect to a delay amount obtained by continuously changing a delay amount with respect to the clock signal of the variable delay circuit 106 within a predetermined range is stored in a memory 126a, and a delay amount for obtaining a minimum error rate is detected. Fig. 8B shows a detailed arrangement of the above variable delay circuit 106. The delay circuit has a variable-length slub line structure. That is, the ends of a U-shaped small-diameter center line 106e are inserted/drawn into/from two parallel large-diameter lines 106c and 106d respectively connected to an input terminal 106a and an output terminal 106b, thereby changing the total line length. The delay amount of the variable delay circuit 106 is determined by a substantial line length 2ℓ 1 + 2ℓ 2 between the input terminal 106a and the output terminal 106b. That is, a slidable table 106g is driven by rotating a rotatable screw 106f by a manual operation or a motor means, e.g., a servo motor, thereby changing the line length ℓ 2 of the small-diameter center line 106e. In Fig. 8B, reference numeral 106h denotes a case, and reference numerals 106i and 106j denote ground plates serving as external lines and arranged to have different heights such that predetermined characteristic impedances between the center lines 106C, 106d, and 106e in the case 106h are maintained. Note that a cover for the case 106h is omitted in Fig. 8B. An operation of the error measuring apparatus will be described below. It is assumed that a data signal to be measured having the center value between a high- (H) level peak voltage and a low- (L) level peak voltage equal to the reference voltage Vr of the comparator 103 is input to the level shifter 112 at time to as shown in (a) of Fig. 9. In this case, since an output from the subtractor 116 becomes zero, the data signal to be measured input to the level shifter 112 is directly input to the comparator 103 and compared with the reference voltage Vr, thereby performing a waveform shaping operation in optimal conditions. At time t 1 , as shown in (a) of Fig. 9, when the offset voltage of the data signal to be measured input to the level shifter 112 is increased stepwise, since an output signal from the level shifter 112 is changed upward stepwise as in (b) of Fig. 9, a center voltage V 0 to the subtractor 116 is changed stepwise as in (c) of Fig. 9. As a result, as shown in (d) of Fig. 9, the subtracted output is changed in a negative direction. The error signal Ve with respect to the level shifter 112, as shown in (e) of Fig. 9, is gradually increased by an output obtained by integrating the subtracted output. The data signal to be measured input to the comparator 103, as shown in (b) of Fig. 9, is changed such that its center value is close to the reference voltage Vr. As a result, at time t 2 , a difference between the input voltage of the subtractor 116 and the reference voltage Vr becomes almost zero. Subsequently, the stable state is continued, and a binary digital signal which is waveform-shaped in optimal conditions is output from the comparator to the discriminator 104. The controller 126 calculates a period T of the clock signal from a gate time of the error measuring unit 121 and the counter value of the clock counter 125, an error rate is calculated every predetermined step d while the delay amount of the variable delay circuit 106 is changed from an initial value D 0 in the predetermined step d by at least one period of the clock signal. The resultant values are stored in the memory 126a. Fig. 10 is a graph showing a change in error rate with respect to the change in delay amount. As shown in (g1) to (g3) of Fig. 10, when a rise timing of the clock signal is changed by almost 1.5 periods of the clock signal with respect to the output ((f) of Fig. 10) from the comparator 103, a change in error rate is maximum at transition points of the output from the comparator 103 as shown in (h) of Fig. 10. This measurement data is stored in the memory 126a of the controller 126, and an intermediate value D 4 between delay amounts D 2 and D 6 is automatically set in the variable delay circuit 106 as an optimal delay amount having a maximum phase margin. After the above setting is performed, the controller 126 performs a normal error measuring process to cause the measured error rates to be sequentially displayed on the display 127. A level shift amount from the A/D converter 119 and the threshold level of the data signal to be measured calculated by the level shift amount and the reference voltage Vr of the comparator 103 are displayed on the display 127 at any time. In the above embodiment, although the subtracted value between the intermediate voltage and the reference voltage is input to the level shifter 112 through the LPF 117, the following arrangement may also be used. That is, as shown in Fig. 11, the subtracted value is changed into subtracted digital data by an A/D converter 130, and shift data used for setting the subtracted data to come close to zero is sent from the controller 126 to a D/A converter 131, thereby controlling the shift amount of the level shifter 112. In the above embodiment, in order to set an optimal delay amount with respect to the clock signal, the optimal amount is determined by the maximum value of an error rate obtained by changing a delay amount for one or more periods of the clock signal. However, a delay amount for obtaining the minimum value of the error rate can be directly set as the optimal value. In this case, a plurality of delay amounts for obtaining the minimum value are obtained, and a maximum phase margin may not be obtained. In the above embodiment, a maximum error rate is used as an optimal delay amount. However, the intermediate value between two delay amounts (D 3 and D 5 in (f) to (h) of Fig. 10) for obtaining equal error rates can be set as an optimal delay amount. The following arrangement may be employed by the above embodiment. That is, sequential operations for setting the optimal threshold voltage of the data signal to be measured are started by operating input means such as switches arranged in the display, the operations are finished, and then an operation for setting the optimal delay amount is performed. Thus, the set threshold level and delay amount may be displayed on the display. Fig. 12 is a block diagram showing an arrangement of a main part extracted from the digital signal analyzing apparatus shown in Fig. 7 in order to readily understand the second embodiment of the present invention. The same reference numerals as in Fig. 7 denote the same part in Fig. 12. In the signal analyzing device, basically, a part including the level shifter 112 constituting the waveform shaping circuit described in the first embodiment, the intermediate voltage detector 113, the control section (including a subtractor and an LPF) 116 and 117, and the comparator 103 optimizes the input digital signal in the vertical (amplitude axis) direction, and a part including the variable delay circuit 106, the discriminator 104, the error measuring unit 121, and the control section (including a CPU) 126 optimizes the input digital signal in the horizontal (time axis) direction. Therefore, data analysis can be easily and accurately performed such that the errors (rate) of the input digital signal are measured. Several modifications of the arrangement in Fig. 12 will be described below. A modification in Fig. 13 is obtained by adding a holding circuit 10 and stopping circuits (switches) 11 and 12 shown in Fig. 4 to the waveform shaping circuit portion in the arrangement of Fig. 12. A modification in Fig. 14 is obtained by adding the holding circuit 10 and a switching circuit SW shown in Figs. 5A and 5B to the waveform shaping circuit portion in the arrangement of Fig. 12. A modification in Fig. 15 is obtained by adding a holding circuit 10A of the first embodiment shown in Fig. 5C to the waveform shaping circuit portion in the arrangement of Fig. 12. In this modification, an A/D converter 10a and a D/A converter 10c correspond to an A/D converter 130 and a D/A converter 131 shown in Fig. 11. An arithmetic controller 126b in the controller (CPU) 126 performs a calculation for displaying the DC offset voltage of an input digital signal by the display 127 on the basis of data output from the A/D converter 10a, and data corresponding to the data from the A/D converter 10a and desired data are selectively output to the D/A converter 10c. Since digital analysis may be performed for 10 or more hours, the above digital holding is advantageously used for ensuring stability during the digital analysis. In the above modifications, in a state wherein the phase of the input clock signal is known in advance, the variable delay circuit 106 on a clock signal line can be omitted. A modification in Fig. 16 is obtained by arranging the variable delay circuit 106 to the previous stage of the level shifter 112 on an input digital signal line in the arrangement of Fig. 12. In this modification, similar to the operation of Fig. 12, after the input digital signal is optimized in the vertical (amplitude axis) direction thereof, the input digital signal is optimized in the horizontal (time axis) direction thereof. Fig. 17 shows a modification obtained by connecting the variable circuit 106 to the sequence stage of the comparator 103 through an input digital signal line in the arrangement of Fig. 12. In this modification, similar to the operation of Fig. 12, after an input digital signal is optimized in the vertical (amplitude axis) direction thereof, the input signal is optimized in the horizontal (time axis) direction. Fig. 18 shows a modification obtained by applying the same waveform shaping circuit as that of Fig. 13 to the arrangement of Fig. 16. Fig. 19 shows a modification obtained by applying the same waveform shaping circuit as that of Fig. 13 to the arrangement of Fig. 17. Fig. 20 shows a modification having the following arrangement. That is, in the controller (CPU) 126 in the arrangement of Fig. 15, the controller 126 is connected to the arithmetic controller 126b via a bus line, and a RAM 126d, a ROM 126e, and an I/O interface 126f are connected to the bus line. In this arrangement, all control functions required for the above embodiments can be performed by software under the control of the controller (CPU) 126. In this modification, a display controller 126c is connected between the arithmetic controller 126b and the display 127, and an external keyboard 140 or a communication line is connected to the I/O interface. Fig. 21 is shows an error measuring apparatus in which the second embodiment of the present invention is employed. Input data supplied to a waveform shaping circuit 201 and an input clock signal supplied to a variable delay circuit 202 are optimized as described above to be output to a discriminator 203. The data discriminated by the discriminator 203 as described above is 1/N-divided by a 1/N demultiplexer 204 in accordance with a timing signal output in response to an output clock signal of the variable delay circuit 202 from a timing generator 205. When the input date has a frequency of 10 GHz and N = 32, the frequency is divided into 310 MHz. In this case, after the input data is error-detected as 32-channel data by an error detector 206, the data is sent to a display 208 and a sync controller 209 through an error counter 207. A reference pattern generator 210 generates reference pattern data supplied to the error detector 206 in accordance with an output from the sync controller 209. The error detector 206, the reference pattern generator 210, the error counter 207, and the sync controller 209 are controlled by the 1/N-divided clock signal from the timing generator 205. A CPU 211 controls the above parts. Note that an automatic searcher 212 controls the waveform shaping circuit 201 and the variable delay circuit 202 under the CPU 211 in an appropriate state. In the digital signal analyzing apparatus according to the second embodiment of the present invention, as described above, a shift amount of a data signal to be measured is automatically controlled such that the intermediate voltage of a data signal to be measured always serves as the reference voltage of a comparator. In addition, the digital signal analyzing apparatus has a delay amount setting means. In this means, a delay amount required for setting the discrimination timing of the discriminator at an optimal position between adjacent state transition points of the digital signal input from the comparator to the discriminator is detected on the basis of an analysis result obtained by changing a delay amount of the variable delay circuit for the clock signal within a predetermined range, and the delay amount is set in the variable delay circuit. For this reason, although a cumbersome manual adjusting operation is not performed while an waveform is observed, an operating point or a discrimination timing of waveform shaped by a comparator can be optimally and automatically set free from differences among individuals and an error caused by distortion of the waveform.

Claims: A signal analyzing apparatus comprising: a level shifter (112) for variably controlling a DC offset voltage of an input digital signal; a comparator (103) for comparing a digital signal output from said level shifter (112) with a predetermined reference voltage so as to shape a waveform of the input digital signal and outputting a shaped digital signal; a discriminator (104) receiving an input clock signal and an output from said comparator (103) as a signal to be discriminated to determine a code of the signal to be discriminated at a timing determined by the input clock signal; and an error measuring unit (121) for comparing a determination signal from said discriminator with a reference signal corresponding to the input digital signal, to thereby output an error signal, characterized in that said apparatus further comprises: intermediate voltage detecting means (113) for detecting and outputting an intermediate voltage between high- and low-level voltages of a digital signal output from said level shifter (112); and first control means (116, 117) for receiving the intermediate voltage output from said intermediate voltage detecting means (113) and the predetermined reference voltage and outputting a control signal for changing the DC offset voltage to equalize the intermediate voltage to the predetermined reference voltage to said level shifter (112). An apparatus according to Claim 1, wherein said apparatus further comprises: a variable delay circuit (106) for delaying a phase of an input clock signal, said discriminator (104) receives an output from said comparator (103) and an output from said variable delay circuit (106) and determines a code of the output signal from said comparator (103) at a timing determined by a delayed clock signal delayed by said variable delay circuit (106). An apparatus according to Claim 1, wherein said apparatus further comprises: a variable delay circuit (106) for delaying a phase of the input digital signal and sending a delayed digital signal to said level shifter (112); and second control means (126) for receiving an output from said error measuring unit (121), detecting an intermediate delay amount of delay amounts corresponding to error signals having maximum values adjacent to each other, and sending the intermediate delay amount to said variable delay circuit (106), to thereby reduce the error signal output from said error measuring unit (121). An apparatus according to Claim 1, wherein said apparatus further comprises: a variable delay circuit (106) for delaying a phase of a signal output from said comparator (103) and sending a delayed signal to said discriminator (104) as a signal to be discriminated; and second control means (126) for receiving an output from said error measuring unit (121), detecting an intermediate delay amount of delay amounts corresponding to error signals having maximum values adjacent to each other, and sending the intermediate delay amount to said variable delay circuit (106), to thereby reduce the error signal output from said error measuring unit (121). An apparatus according to Claim 2, wherein said apparatus further comprises: second control means (126) for receiving an output from said error measuring unit (121), detecting an intermediate delay amount of delay amounts corresponding to error signals having maximum values adjacent to each other, and sending these intermediate delay amounts to said variable delay circuit (106), to thereby reduce the error signal output from said error measuring unit (121). An apparatus according to any one of the Claims 1 to 5, wherein said apparatus further comprises: holding means (10) for holding the control signal output from said first control means (116, 117); and stopping means (11, 12) for stopping an operation of said intermediate voltage detecting means when the control signal is held by the holding means (10). An apparatus according to any one of the Claims 1 to 5, wherein said apparatus further comprises: holding means (10) for holding the control signal output from said first control means; and switching means (SW) for causing said intermediate voltage detecting means (113) to switch from a state for detecting the intermediate voltage between the high- and low-level voltages of the digital signal output from said level shifter (112) to a state for limiting the high- and low-level signals of the digital signal output from said level shifter (112) to not less than the predetermined voltage and not more than the predetermined voltage, respectively, when the control signal is held by said holding means (10). An apparatus according to any one of the Claims 1 to 7, wherein said apparatus further comprises: an A/D converter (130) for outputting data corresponding to the control signal output from said first control means (116, 117); an arithmetic controller (126b) for performing a calculation for displaying the DC offset voltage of the input digital signal in accordance with the data output from said A/D converter (130) so as to output a calculation result to a display (127) and for selectively outputting desired data and data corresponding to the data output from said A/D converter (130) together with a switch control signal; a D/A converter (131) for outputting an analog signal corresponding to the data output from said arithmetic controller (126b); and a control signal switch (10d) for selectively outputting the analog signal output from said D/A converter (131) and the control signal output from said first control means (CONT) to said level shifter (112) in accordance with the switch control signal output from said arithmetic controller (126b).

Inventors: SAITO SUMIO, SAITO, SUMIO
Applicants: ANRITSU CORP, ANRITSU CORPORATION
Application year: 1991
Main classification: H03K5
IPC codes: H03K5