[go: up one dir, main page]

CN112118028A - Method for realizing automatic measurement of low-speed serial data bit rate - Google Patents

Method for realizing automatic measurement of low-speed serial data bit rate Download PDF

Info

Publication number
CN112118028A
CN112118028A CN202010972045.0A CN202010972045A CN112118028A CN 112118028 A CN112118028 A CN 112118028A CN 202010972045 A CN202010972045 A CN 202010972045A CN 112118028 A CN112118028 A CN 112118028A
Authority
CN
China
Prior art keywords
bit
module
data
counting
accumulation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010972045.0A
Other languages
Chinese (zh)
Inventor
李斌
张晓峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Optical Electrical Communication Technology Co Ltd
Original Assignee
Tianjin Optical Electrical Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Optical Electrical Communication Technology Co Ltd filed Critical Tianjin Optical Electrical Communication Technology Co Ltd
Priority to CN202010972045.0A priority Critical patent/CN112118028A/en
Publication of CN112118028A publication Critical patent/CN112118028A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/02Details
    • H04B3/46Monitoring; Testing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention discloses a method for realizing automatic measurement of low-speed serial data bit rate. The method filters burrs or jitters of input data by an input data passing jitter removal module, dynamically and automatically measures and identifies the bit width of input serial data by a bit width identification module, utilizes a bit counting accumulation module to accumulate and count data edges based on the identified bit width, utilizes a clock period counting accumulation module to accumulate and count a main clock, resets if the bit width identification module dynamically identifies a new bit width, and calculates and outputs a measurement result by adopting a result calculation module according to a bit accumulation counting result and a clock accumulation counting result. The method realizes the automatic measurement of the bit rate of the low-speed serial data based on the FPGA, and can obtain the precision superior to the common clock frequency error in a short time. The device can monitor and measure the real-time rate of the unknown bit rate access low-speed serial data.

Description

Method for realizing automatic measurement of low-speed serial data bit rate
Technical Field
The invention relates to the field of communication, in particular to a method for realizing automatic measurement of bit rate of low-speed serial data; and more particularly to automatic bit rate measurement of low speed digital serial communication signals.
Background
When a communication device accesses a low-speed (below 10 Mbps) digital serial signal (such as an RS232 serial port, E1, etc.), if the bit rate of the access signal is unknown, the device is required to automatically measure the bit rate of the access signal. In the prior art, a receiving end and a transmitting end are generally required to negotiate to determine a certain communication protocol (for example, to determine serial communication), and then the bit rate of the receiving end and the transmitting end can be negotiated, so that the receiving end and the transmitting end are not strong in universality and universality due to the dependence on the protocol, and cannot access any low-speed digital serial signal of an unknown protocol.
Disclosure of Invention
The present invention is to solve the above problems in practical applications, and provide a method for implementing automatic measurement of low-speed serial data bit rate.
The technical scheme adopted by the invention is as follows: a method for realizing low-speed serial data bit rate automatic measurement is characterized in that the method comprises the steps of firstly filtering burrs or jitters of input data of accessed low-speed serial input data through a jitter passing module, then dynamically and automatically measuring and identifying the bit width of the input serial data through a bit width identification module, carrying out accumulated counting on data edges through a bit counting accumulation module based on the identified bit width, simultaneously carrying out accumulated counting on a main clock not less than 100MHz through a clock period counting accumulation module, resetting the bit counting accumulation module and the clock period counting accumulation module if the bit width identification module dynamically identifies a new bit width, and calculating and outputting a measurement result through a result calculation module based on the bit accumulated counting result and the clock accumulated counting result.
The method comprises the following specific steps:
firstly, carrying out debouncing processing on low-speed serial input data, and filtering out burr dithering in the low-speed serial input data through a debouncing module; the debouncing module firstly carries out multistage cascade register sampling on low-speed serial input data by using a main clock, judges the data edge of the change of the low-speed serial input data, judges and filters burrs if the change of two adjacent data edges is less than two clock periods, namely, keeps the data height unchanged at the position and outputs the data height to the bit width identification module; and if the change of the two adjacent data edges is not less than two clock cycles, the normal data is judged not to be processed and is transmitted to the bit width identification module.
And secondly, the bit width identification module dynamically and automatically identifies the bit width of the data, firstly, the minimum data edge change period is dynamically identified, if a new minimum data edge change period is found dynamically, a reset signal is output to the bit counting accumulation module and the clock period counting accumulation module, and the currently identified bit width is output to the bit counting accumulation module.
And thirdly, the bit counting accumulation module analyzes the input data edges, identifies a plurality of bit widths between two adjacent data edges, namely judges the bit widths into a plurality of bit numbers, accumulates and counts the bit numbers, if a reset signal is received, proves that the previous-stage bit width identification module dynamically identifies a new bit width, and therefore the accumulated counts need to be reset and cleared and then accumulation is restarted, and accumulated count results are output to the result calculation output module.
And fourthly, the clock period counting and accumulating module counts the clock period, namely, each rising edge of the clock adds one to the accumulated count, if a reset signal is received, the former-stage bit width identification module is proved to dynamically identify a new bit width, so that the accumulated count needs to be reset and cleared and then is accumulated again, and the accumulated count result is output to the result calculation and output module.
Fifthly, the result calculation output module calculates the received bit accumulation counting result, the clock accumulation counting result and the given invariable main clock frequency to obtain a final measuring result, and the calculation formula is as follows: input data bit rate measurement = master clock frequency × bit accumulated count result ÷ clock accumulated count result;
wherein: inputting a data bit rate measurement in bps; the master clock frequency is in Hz.
The invention has the beneficial effects that: by adopting the method, the automatic measurement of the bit rate of the low-speed serial data based on the FPGA is realized, and the precision superior to the common clock frequency error can be obtained in a short time. The device can monitor and measure the real-time rate of the unknown bit rate access low-speed serial data.
Drawings
FIG. 1 is a schematic diagram of the present invention;
FIG. 2 is a waveform diagram illustrating the results of measuring 1ms data according to the present invention;
FIG. 3 is a waveform diagram illustrating the results of 20ms data measured according to the present invention.
Detailed Description
The invention is further illustrated by the following figures and examples.
Based on a KU040 development board of Xilinx corporation, the scheme can realize automatic measurement of the bit rate of input low-speed serial data. Assuming that the master clock adopts 100MHz (the higher the master clock is, the better the measurement accuracy is), and assuming that the bit rate of the input serial data is not higher than 10Mbps, the result accuracy can be automatically measured within 1 second and is better than 1bps (the accuracy error of the master clock is not counted).
The specific method implemented as a block-by-block introduction follows, as shown in fig. 1.
(1) Debouncing module
In order to avoid an abnormality such as jitter of signal glitches due to a factor such as channel noise interference, it is necessary to first perform a debounce process on input data. The debouncing module firstly uses a main clock to carry out multi-stage cascade register sampling on input data, judges a data edge of input data change, judges and filters burrs if the change of two adjacent data edges is less than two clock periods, namely, the data height is kept unchanged at the position and the burrs are output to a next-stage module, namely a bit width identification module; if the change of the two adjacent data edges is not less than two clock cycles, the normal data is judged to be not processed and transmitted to a next-stage module, namely a bit width identification module. Meanwhile, the debounce module sends the data edge change after filtering the burr to the bit counting accumulation module.
(2) Bit width identification module
The bit width identification module dynamically and automatically identifies the bit width of the data, firstly, the minimum data edge change period is dynamically identified, if a new minimum data edge change period is found dynamically, a reset signal is output to the bit counting accumulation module and the clock period counting accumulation module, and the currently identified bit width is output to the bit counting accumulation module.
(3) Bit counting accumulation module
The bit counting and accumulating module analyzes the input data edges, identifies that a plurality of bit widths exist between two adjacent data edges, namely, judges the bit widths to be a plurality of bit numbers, accumulates and counts the bit numbers, and proves that the previous-stage bit width identification module dynamically identifies a new bit width if a reset signal is received, so that the accumulated count needs to be reset and cleared and then begins to be accumulated again. And the accumulated counting result is output to a lower result calculation output module.
(4) Clock period counting accumulation module
The clock period counting and accumulating module counts the period of the clock, namely, each rising edge of the clock adds one to the accumulated count, and if a reset signal is received, the former-stage bit width identification module is proved to dynamically identify a new bit width, so that the accumulated count needs to be reset and cleared and then is accumulated again. And the accumulated counting result is output to a lower result calculation output module.
(5) Result calculation output module
And the result calculation output module calculates the received bit accumulation counting result, the clock accumulation counting result and the given invariable main clock frequency to obtain a final measuring result. The calculation formula is as follows: input data bit rate measurement = master clock frequency × bit accumulated count result ÷ clock accumulated count result.
The measured data results are illustrated:
the master clock is 100MHz and the bit rate of the measured low speed digital signal is 666 kbps.
When measured for 1 millisecond time, the output measurement =100MHz × 643 ÷ 96547 =665.99687kbps with an error of approximately 4 bps. The measurement signals and the resulting output are shown in fig. 2.
When the time was measured at 0.2 seconds, the output measurement =100MHz × 13303 ÷ 1997446 =666.00048kbps was obtained with an error of approximately 0.5 bps. The measurement signals and the results output are shown in fig. 3.

Claims (1)

1. A method for realizing low-speed serial data bit rate automatic measurement is characterized in that the method comprises the steps that accessed low-speed serial input data are subjected to burr or jitter filtering of the input data through a jitter removing module, then dynamic automatic measurement and identification are carried out on the bit width of the input serial data through a bit width identification module, a bit counting accumulation module is used for carrying out accumulation counting on data edges based on the identified bit width, meanwhile, a clock period counting accumulation module is used for carrying out accumulation counting on a main clock which is not less than 100MHz, if the bit width identification module dynamically identifies a new bit width, the bit counting accumulation module and the clock period counting accumulation module are reset, and a measurement result can be calculated and output by adopting a result calculation module based on a bit accumulation counting result and a clock accumulation counting result;
the method comprises the following specific steps:
firstly, carrying out debouncing processing on low-speed serial input data, and filtering out burr dithering in the low-speed serial input data through a debouncing module; the debouncing module firstly carries out multistage cascade register sampling on low-speed serial input data by using a main clock, judges the data edge of the change of the low-speed serial input data, judges and filters burrs if the change of two adjacent data edges is less than two clock periods, namely, keeps the data height unchanged at the position and outputs the data height to the bit width identification module; if the change of the two adjacent data edges is not less than two clock cycles, the normal data is judged not to be processed and is transmitted to the bit width identification module;
the bit width identification module dynamically and automatically identifies the bit width of the data, firstly, the minimum data edge change period is dynamically identified, if a new minimum data edge change period is dynamically found, a reset signal is output to the bit counting accumulation module and the clock period counting accumulation module, and the currently identified bit width is output to the bit counting accumulation module;
thirdly, the bit counting accumulation module analyzes the input data edges, identifies a plurality of bit widths between two adjacent data edges, namely judges the bit widths into a plurality of bit numbers, accumulates and counts the bit numbers, if a reset signal is received, proves that the previous-stage bit width identification module dynamically identifies a new bit width, and therefore the accumulated count needs to be reset and cleared and then starts accumulation again, and the accumulated count result is output to the result calculation output module;
the clock period counting and accumulating module counts the clock period, namely, each rising edge of the clock adds one to the accumulated count, if a reset signal is received, the former-stage bit width identification module is proved to dynamically identify a new bit width, so that the accumulated count needs to be reset and cleared and then begins to be accumulated again, and the accumulated count result is output to the result calculation and output module;
fifthly, the result calculation output module calculates the received bit accumulation counting result, the clock accumulation counting result and the given invariable main clock frequency to obtain a final measuring result, and the calculation formula is as follows: input data bit rate measurement = master clock frequency × bit accumulated count result ÷ clock accumulated count result;
wherein: inputting a data bit rate measurement in bps;
the master clock frequency is in Hz.
CN202010972045.0A 2020-09-16 2020-09-16 Method for realizing automatic measurement of low-speed serial data bit rate Pending CN112118028A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010972045.0A CN112118028A (en) 2020-09-16 2020-09-16 Method for realizing automatic measurement of low-speed serial data bit rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010972045.0A CN112118028A (en) 2020-09-16 2020-09-16 Method for realizing automatic measurement of low-speed serial data bit rate

Publications (1)

Publication Number Publication Date
CN112118028A true CN112118028A (en) 2020-12-22

Family

ID=73803192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010972045.0A Pending CN112118028A (en) 2020-09-16 2020-09-16 Method for realizing automatic measurement of low-speed serial data bit rate

Country Status (1)

Country Link
CN (1) CN112118028A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024221839A1 (en) * 2023-04-26 2024-10-31 中兴通讯股份有限公司 Rate regeneration method and apparatus for client signal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108292924A (en) * 2015-11-12 2018-07-17 高通股份有限公司 Low speed and high-speed parallel bit stream are conveyed on high-speed serial bus
CN209170340U (en) * 2018-12-10 2019-07-26 珠海市一微半导体有限公司 Pwm signal sample detecting circuit, processing circuit and chip

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108292924A (en) * 2015-11-12 2018-07-17 高通股份有限公司 Low speed and high-speed parallel bit stream are conveyed on high-speed serial bus
CN209170340U (en) * 2018-12-10 2019-07-26 珠海市一微半导体有限公司 Pwm signal sample detecting circuit, processing circuit and chip

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郑锋等: "《51单片机应用系统典型模块开发大全 修订版》", 28 February 2013, 中国铁道出版社 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024221839A1 (en) * 2023-04-26 2024-10-31 中兴通讯股份有限公司 Rate regeneration method and apparatus for client signal

Similar Documents

Publication Publication Date Title
CN102227620B (en) Equipment for diagnosing blockage of lead pipe and method for diagnosing blockage
US10892911B2 (en) Controller area network receiver
CN112118028A (en) Method for realizing automatic measurement of low-speed serial data bit rate
CN110987102A (en) A kind of high anti-interference and high precision gas ultrasonic flowmeter and its measurement method
CN207232254U (en) A kind of high precision small frequency counter module
CN117213864A (en) Intelligent detection method and system for lubricating oil metal chip particles suitable for engine
CN115514599B (en) A method and system for automatically removing interference signals in asynchronous serial communication
CN111722012B (en) Pulse counting frequency measurement method and device
CN111506468A (en) Hard disk state monitoring system and method
CN111380597A (en) Flow abnormity detection method and circuit of phase difference type ultrasonic flowmeter
CN211406003U (en) Decoding system of Manchester code
US20080175338A1 (en) Apparatus and method for detecting null symbols
KR20220095708A (en) All Digital Optical Signal Detection Circuit Using a Counter Inside a Clock Data Recovery IC
EP2639590B1 (en) Wide range, high resolution frequency monitor
CN211018863U (en) Decoding system of BMC (baseboard management controller) code
CN112782474A (en) Frequency detection circuit and frequency detection method
CN118353425A (en) Burr filtering method, device, equipment and storage medium
CN119001139B (en) A circuit and detection method of a high-precision encoder speed and frequency detection device
CN114608705B (en) Spectral signal data sampling and peak value detection method
US7064686B2 (en) Method of determining a data rate and apparatus therefor
CN116559529A (en) A high-precision frequency measurement method and system based on edge detection
CN114531137B (en) Rotating speed signal acquisition method and device based on frequency division digital filtering and storage medium
RU207031U1 (en) DEVICE FOR SELECTION OF FEATURES OF STRUCTURED OBJECTS WITH CHECK SUM
TWI427942B (en) Communication apparatus with transmission rate detecting function and method thereof
CN118764136B (en) PSI5 bus modulation-demodulation communication method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20201222