Summary of the invention
Embodiment of the present invention technical problem to be solved is, a kind of clock detection of SOC chip is providedCircuit, expends extensive work amount to solve complicated multi-clock zone SOC chip sampling conventional method in prior artAnd the technical problem of bringing manual detection to slip up.
For solving the problems of the technologies described above, the invention provides a kind of clock detection circuit of SOC chip, connect oneClock to be observed is inputted so that this clock to be observed is detected, and this clock detection circuit comprises timing listUnit, for generation time information in the time that this clock detection circuit is worked. Also comprise:
Configuration information memory cell, for pre-stored configuration information, this configuration information comprise clock turn-off sentenceDisconnected threshold value and burr decision gate limit value.
Expected result memory cell, pre-stored expectation file, this expectation file comprises clock frequency, dutyRatio and the time of origin turn-offing.
High frequency clock generation unit, for generation of high frequency clock signal.
Whether clock signal judging unit, for judging clock signal to be observed according to this high frequency clock signalThere is rising edge and/or trailing edge, and determine origination point information corresponding while there is rising edge and/or trailing edge.
Detection computations unit, for appearance rising edge and/or the decline definite according to this clock signal judging unitAlong time corresponding origination point information and this timing unit temporal information of producing calculate the frequency of this clock to be observedRate and dutycycle, and during according to the definite appearance rising edge of this clock signal judging unit and/or trailing edge pairIn the origination point information of answering, the temporal information that this timing unit produces, this configuration information memory cell, storeConfiguration information judges that this clock to be observed is whether in off state and whether occur burr.
Detection record unit, for storing the result of calculation of this detection computations unit. And
Text contrast unit, for expectation file and this detection note that this expected result memory cell is storedThe result of calculation of storing in record unit contrasts to export automatic Verification result.
The clock detection circuit of a kind of SOC chip provided by the invention, by the detection computations unit pair arrangingClock signal to be observed is carried out clock frequency, clock duty cycle, whether clock is turned off and clock occursThe parameters such as burr are calculated, and determine final by text contrast unit according to expected result and result of calculationSimulation result. All events are free record all, facilitates between inspection event when sequencing and event occurBetween, and can not need to preserve the wave file of emulation. Thereby, solve complicated multi-clock in prior artTerritory SOC chip sampling conventional method expends extensive work amount and brings the technical problem of manual detection error.
Brief description of the drawings
Fig. 1 is the electrical block diagram of the clock detection circuit of the SOC chip in embodiment of the present invention;
Fig. 2 is the structure chart of the rising edge judge module in the clock detection circuit of the SOC chip shown in Fig. 1;
Fig. 3 is the structure chart of the trailing edge judge module in the clock detection circuit of the SOC chip shown in Fig. 1.
Label declaration:
Clock detection circuit 10
High frequency clock generation unit 11
Clock signal judging unit 12
Rising edge judge module 121
Trailing edge judge module 122
Timing unit 13
Current frequency values memory cell 14
Configuration information memory cell 15
Detection computations unit 16
Frequency computation part module 161
Dutycycle computing module 162
Clock turn-offs detection module 163
Clock bur detection module 164
Expected result memory cell 17
Detection record unit 18
Text contrast unit 19
Detailed description of the invention
By describing technology contents of the present invention, structural feature in detail, being realized object and effect, below in conjunction withEmbodiment also coordinates accompanying drawing to be explained in detail.
Refer to Fig. 1, when the clock detection circuit 10 of the SOC chip in embodiment of the present invention comprises high frequencyClock generation unit 11, clock signal judging unit 12, timing unit 13, current frequency values memory cell 14,Configuration information memory cell 15, detection computations unit 16, expected result memory cell 17, detection record unit18 and text contrast unit 19. Wherein, this high frequency clock generation unit 11, clock signal judging unit12 and detection computations unit 16 connect successively, this current frequency values memory cell 14, configuration information storageUnit 15, timing unit 13 and detection record unit 18 are all connected with this detection computations unit 16, this phaseHope result store unit 17 be connected with text contrast unit 19 with detection record unit 18 simultaneously.
When utilizing before this clock detection circuit 10 starts to carry out clock signal detection validation, need to be to be observedClock input be connected on the clock that needs observation, make clock to be observed can correctly input this clock inspectionSlowdown monitoring circuit 10. Meanwhile, the pre-stored configuration information of this configuration information memory cell 15, this configuration information comprisesClock turn-offs decision gate limit value and burr decision gate limit value. The pre-stored emulation of this expected result memory cell 17The time of origin of desired clock frequency, dutycycle and shutoff in use-case, for the inspection of actual verificationSurvey log file compares.
In the time that this clock detection circuit 10 starts to carry out clock signal detection validation, this high frequency clock generation unit11 for generation of high frequency clock signal and input this high frequency clock signal to this clock signal judging unit 12, shouldClock signal judging unit 12 is for judging whether clock signal to be observed occurs rising edge and/or trailing edge,And when determining while there is rising edge and/or trailing edge, corresponding origination point information is sent to detection computations unit16。
In the present embodiment, this clock signal judging unit 12 comprises rising edge judge module 121 and declinesAlong judge module 122. Please refer to Fig. 2 and Fig. 3, be respectively this rising edge judge module 121 and declineAlong the structural representation of judge module 122. This rising edge judge module 121 comprise first order register D1,Second level register D2 and rising edge determining device D3, this first order register D1 utilizes high frequency clock to produceThe high frequency clock signal that unit 11 produces agitates this clock signal to be observed for twice, if first order register D1Output valve be the output valve of height and second level register D2 while being low, this rising edge determining device D3 determinesThere is rising edge in clock signal now. This trailing edge judge module 122 comprises first order register D4,Secondary register D5 and trailing edge determining device D6, same, this first order register D4 utilizes high frequency clockThe high frequency clock signal that generation unit 11 produces agitates this clock signal to be observed for twice, if first order registerWhen the output valve of D4 is low and the output valve of second level register D5 is high, this trailing edge determining device D6Determine that trailing edge appears in clock signal now.
This timing unit 13 is made up of timer, for generation time in the time that this clock detection circuit 10 is workedInformation. This detection computations unit 16 according to the definite appearance rising edge of this clock signal judging unit 12 and/orThe temporal information that when trailing edge, corresponding origination point information and this timing unit 13 produce calculates this time to be observedThe frequency of clock and dutycycle, and according to the definite appearance rising edge of this clock signal judging unit 12 and/or underFall along time corresponding origination point information, temporal information, this configuration information storage that this timing unit 13 produces singleIn unit 15, the configuration information of storage judges that this clock to be observed is whether in off state and whether occur hairThorn.
In the present embodiment, this detection computations unit 16 comprises frequency computation part module 161, dutycycle calculatingModule 162, clock turn-off detection module 163 and clock bur detection module 164. Wherein, this frequency meterCalculate module 161 according to the definite rising edge origination point information of this rising edge judge module 121 and this timing unit13 temporal informations that produce calculate the frequency of this clock to be observed, and result of calculation is sent to this current frequencyRate value memory cell 14 and this detection record unit 18 are stored. This dutycycle computing module 162 is during according to thisThe rising edge that clock signal judging unit 12 is definite or/and trailing edge origination point information and this timing unit 13 produceTemporal information calculate the dutycycle of this clock to be observed, and result of calculation is sent to this detection record listUnit's 18 storages. This clock turn-offs detection module 163 rising edge definite according to this rising edge judge module 121Temporal information and this configuration information memory cell 15 that origination point information, this timing unit 13 produce are storedClock turn-off decision gate limit value and whether calculate this clock to be observed in off state, and judged resultBeing sent to this detection record unit 18 stores. This clock bur detection module 164 is according to this clock signal judgementTemporal information that the rising edge that unit 12 is definite and/or trailing edge origination point information, this timing unit 13 produce,The frequency of this clock to be observed that this frequency computation part module 161 calculates and this configuration information memory cell 15The burr decision gate limit value of storage calculates this clock to be observed and whether occurs burr, and judged result is sentStore to this detection record unit 18.
Particularly, the computational methods that this frequency computation part module 161 is calculated the frequency of this clock to be observed are: shouldFrequency computation part module 161 comprises a rising time memory (not shown), for storing the last receptionThe time of the rising edge arriving, its initial default value is 0. Export whenever receiving this rising edge judge module 121Rising edge useful signal time store the temporal information that this timing unit 13 was inputted at that time into this rising timeIn memory. When receiving next time after rising edge useful signal, temporal information is at that time deducted to this risingTo obtain the time difference of twice rising edge, then use 1 along the last rising time information in time memoryObtain frequency values divided by the time difference (chronomere be second), simultaneously this time information renovation storageInterior to cover the temporal information of last time to this rising time memory. If this frequency computation part module 161The frequency values calculating is the same with the frequency values of storage in this current frequency values memory cell 14, not to this detectionRecord cell 18 is exported new recorded information, if the frequency values that this frequency computation part module 161 calculates and thisIn current frequency values memory cell 14, the frequency values of storage is different, exports to this detection record unit 18New recorded information is upgraded this current frequency values memory cell 14 simultaneously. Wherein, this frequency computation part module 161The file format that outputs to this detection record unit 18 is the time point of current frequency and change of frequency.
The computational methods that this dutycycle computing module 162 calculates the dutycycle of this clock to be observed are: Mei DangjieReceive after the rising edge useful signal that this rising edge judge module 121 exports, by defeated timing unit at that time 13The temporal information entering stores in this rising time memory. Whenever receiving this trailing edge judge module 122After the trailing edge useful signal of output, the temporal information that timing unit at that time 13 is inputted stores this decline intoAlong in time memory. When receiving next time after rising edge useful signal, temporal information is at that time deductedLast rising time information in this rising time memory is to obtain the time difference of twice rising edge.Then, the temporal information of this rising time memory is deducted to the time letter in this trailing edge time memoryBreath, to obtain the time span of high level, finally uses the time span of high level divided by the time of twice rising edgePoor to obtain the value of clock duty cycle. If it is up-to-date that this dutycycle computing module 162 relatively calculatesWhen clock duty cycle value is the same with value in this current dutyfactor value memory, not to this detection record unitThe new recorded information of 18 output, if the up-to-date clock that this dutycycle computing module 162 relatively calculatesWhen value in dutyfactor value and this current dutyfactor value memory is different, defeated to this detection record unit 18The recorded information making new advances, what upgrade this current dutycycle memory is last look simultaneously. Wherein, this dutycycleThe form that computing module 162 outputs to the file of this detection record unit 18 is current clock duty cycle and accounts forThe empty time point than changing.
This clock turn-offs detection module 163 and calculates the whether computational methods in off state of these clocks to be observedFor: this clock turn-offs detection module 163 and comprises a rising time memory, connects for storing the last timeReceive the time of rising edge, its initial default value is 0. Export whenever receiving this rising edge judge module 121Rising edge useful signal time temporal information that timing unit at that time 13 is inputted store this rising time intoIn memory. Calculate in time of timing unit 13 current inputs and this rising time memory, store timeBetween time difference of value, by the clock shutoff decision gate of storage in this time difference and this configuration information memory cell 15Limit value compares, if when this time difference is greater than this clock shutoff decision gate limit value, judge that this is to be detectedClock is turned off, and outputs to this detection record unit 18 and store. Wherein, this clock turn-offs detection module 163The form that outputs to detection record file is the time point that judges that clock shutoff event occurs and occurs.
This clock bur detection module 164 judges whether this clock to be observed occurs that the computational methods of burr are:This clock bur detection module comprises a rising time memory and a trailing edge time memory, uses respectivelyIn the last time that receives rising edge and trailing edge of storage, its initial default value is 0. Whenever receivingAfter the rising edge useful signal that this rising edge judge module 121 is exported, timing unit at that time 13 is inputted timeBetween information store in this rising time memory. Export whenever receiving this trailing edge judge module 122Trailing edge useful signal after temporal information that timing unit at that time 13 is inputted store this trailing edge time intoIn memory. Calculate the time of the time value of storing in rising time memory and trailing edge time memoryDifference, if this time difference is less than the burr decision gate limit value of storage in this configuration information memory cell 15,Judge that burr appears in this clock to be detected, and this judged result is outputed to this detection record unit 18. ItsIn, this clock bur detection module 164 outputs to the form of file of this detection record unit 18 when judgingThere is the time point that burr event occurs and occurs in clock.
Text contrast unit 19 is by expectation file and this detection of storage in this expected result memory cell 17The detection record file that in record cell 18, this detection computations unit 16 of storage calculates contrasts to exportAutomatic Verification result. Particularly, text contrast unit 19 is according to storage in this detection record unit 18Detection record file judges whether the jagged information that occurs, occurs information if jagged, and the result of exporting isMistake. If do not have burr to occur information, expectation file and detection record file are contrasted, when reallyRegularly hope when file is consistent with detection record file that Output rusults is that emulation is correct, when determine expect file andWhen detection record file is inconsistent, Output rusults is dummy error.
The clock detection circuit of a kind of SOC chip provided by the invention, by the detection computations unit pair arrangingClock signal to be observed is carried out clock frequency, clock duty cycle, whether clock is turned off and clock occursThe parameters such as burr are calculated, and determine final by text contrast unit according to expected result and result of calculationSimulation result. All events are free record all, facilitates between inspection event when sequencing and event occurBetween, and can not need to preserve the wave file of emulation. Thereby, solve complicated multi-clock in prior artTerritory SOC chip sampling conventional method expends extensive work amount and brings the technical problem of manual detection error.
The foregoing is only embodiments of the invention, not thereby limit the scope of the claims of the present invention, every profitThe equivalent structure of doing by description of the present invention and accompanying drawing content or the conversion of equivalent flow process, or directly or indirectly transportBe used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.