Data interaction method, handheld communication device terminal and storage medium
By introducing a data interaction module and a selection logic unit into the handheld communication equipment maintenance terminal, the working mode is identified and the target input interface is selected, which solves the data interaction conflict problem caused by the single interface and realizes stable interaction of multiple types of data and interface expansion.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QUALSEN (GUANGZHOU) TECH CO LTD
- Filing Date
- 2023-06-05
- Publication Date
- 2026-08-04
AI Technical Summary
Existing handheld installation and maintenance communication terminals have a single interface, which cannot achieve compatible interaction of multiple data types and may lead to data interaction conflicts.
A data interaction module is introduced into the handheld communication installation and maintenance terminal. The working mode of the optical cable detection module is identified through the selector and logic unit, the target input interface is selected, and the data is acquired and written to the ARM processor through OTDR data acquisition and burning. This enables the interaction of various types of data and prevents conflicts through interface arbitration.
It enables stable interaction of various data types with a single SPI interface and a limited number of I/O ports, avoids data interaction conflicts, and expands the interface functionality of ARM.
Smart Images

Figure CN116743247B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical communication technology, specifically to a data interaction method, a handheld communication equipment maintenance terminal, and a storage medium. Background Technology
[0002] Adding new functions to existing handheld PDA (Personal Digital Assistant) terminals and handheld integrated maintenance terminals requires redeveloping the product while ensuring sufficient interfaces between the FPGA and ARM. However, existing small-sized, single-function PDAs with only a single SPI interface and a limited number of I / O ports on the ARM processor may not be able to handle various data interactions when interacting with the FPGA. Furthermore, conflicts may arise when transmitting different types of data on an ARM processor with only a single SPI interface. Therefore, a solution is needed that enables multiple types of data interaction between the FPGA and ARM while preventing data interaction conflicts, even with only a single SPI interface and a limited number of I / O ports on the ARM. Summary of the Invention
[0003] The main objective of this invention is to solve the technical problem that existing handheld installation and maintenance communication terminals have a single interface and cannot achieve compatible interaction of multiple data types.
[0004] The first aspect of this invention provides a data interaction method applied to a handheld communication installation and maintenance terminal. The handheld communication installation and maintenance terminal includes an ARM processor and a data interaction module based on an FPGA design. The ARM processor includes an optical cable detection module, which has an input / output interface and a data interface. The data interaction module includes a selector, a programming input interface, and an OTDR input interface. The selector's selection terminal is connected to the input / output interface, its output terminal is connected to the data interface, and its input terminal is connected to both the programming input interface and the OTDR input interface.
[0005] The data interaction method includes: the data interaction module identifying the current working mode of the optical cable detection module, wherein the working mode includes a programming mode and an OTDR mode; the data interaction module selecting one of the programming input interface and the OTDR input interface as a target input interface based on the selector according to the working mode; if the target input interface is an OTDR input interface, the optical cable detection module sends parameter configuration information to the data interaction module for parameter configuration operation; the data interaction module configures the pulse optical signal according to the parameter configuration information and collects the feedback OTDR data through the OTDR data acquisition unit; the data interaction module writes the OTDR data to the ARM processor through the data interface; if the target input interface is a programming input interface, the data interaction module writes the programming data input by the programming input interface to the ARM processor through the data interface.
[0006] Optionally, in a first implementation of the first aspect of the present invention, before the data interaction module identifies the current working mode of the optical cable detection module, the method further includes: the optical cable detection module generating interface configuration information based on the current working pulse timing and sending the interface configuration information to the data interaction module; the data interaction module configuring the interface according to the interface configuration information, and after the configuration is completed, receiving externally input data through the programming input interface and the OTDR input interface.
[0007] Optionally, in a second implementation of the first aspect of the present invention, the data interaction module includes a first-level selection logic unit; the data interaction module identifies the current working mode of the optical cable detection module, including: the first-level selection logic unit determines a level value based on the real-time level signal output by the input / output interface; if the level value is a first level value, the first-level selection logic unit determines that the optical cable detection module is currently in a burning mode; if the level value is a second level value, the first-level selection logic unit determines that the optical cable detection module is currently in an OTDR mode.
[0008] Optionally, in a third implementation of the first aspect of the present invention, the data interaction module selects one of the programming input interface and the OTDR input interface as the target input interface based on the selector according to the working mode, including: if the working mode is programming mode, the first-level selection logic unit determines the programming input interface as the target input interface; the first-level selection logic unit establishes a first communication link between the data interface and the programming input interface; or, if the working mode is OTDR mode, the first-level selection logic unit determines the OTDR input interface as the target input interface; the first-level selection logic unit establishes a second communication link between the data interface and the OTDR input interface.
[0009] Optionally, in a fourth implementation of the first aspect of the present invention, the data interaction module further includes a secondary selection logic unit connected to an input terminal of the primary selection logic unit; the data interaction module writes the OTDR data to the ARM processor via the OTDR data interface, including: the optical cable detection module obtains the data preparation signal at the output terminal of the secondary selection logic unit and determines whether the data preparation signal meets the preset reporting conditions; if not, the optical cable detection module continues the parameter configuration operation, continuously receives OTDR data through the secondary selection logic unit and processes the OTDR data through the OTDR data processing unit; if satisfied, the optical cable detection module enables the data reporting operation, disables the parameter configuration operation, and transmits the OTDR data input through the OTDR input interface to the ARM processor based on the second communication link.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, after the optical cable detection module continues parameter configuration operations if the condition is not met, and continuously receives OTDR data through the secondary selection logic unit and processes the OTDR data through the OTDR data processing unit, the method further includes: the data interaction module storing the processed OTDR data in a preset location and monitoring the amount of data in the preset location; after the amount of data reaches a preset value, the secondary selection logic unit updates the data preparation signal to meet the reporting conditions; based on the data preparation signal that meets the reporting conditions, the optical cable detection module enables the data reporting operation and transmits the OTDR data stored in the preset location to the ARM processor through the second communication link.
[0011] Optionally, in a sixth implementation of the first aspect of the present invention, the optical cable detection module enables a data reporting operation based on the data preparation signal that meets the reporting conditions, and transmits the OTDR data stored in a preset location to the ARM processor through the second communication link. This includes: when the data preparation signal meets the reporting conditions, the optical cable detection module determines whether the data preparation signal is a high-level signal; if not, the optical cable detection module issues an alarm signal indicating a data reporting operation error; if yes, the optical cable detection module receives the data preparation signal, and based on the data preparation signal, disables parameter configuration operations, transmits the OTDR data stored in the preset location to the ARM processor through the second communication link, and updates the real-time level signal output by the input / output interface.
[0012] Optionally, in the seventh implementation of the first aspect of the present invention, after the first-level selection logic unit writes the OTDR data input by the OTDR input interface to the ARM processor based on the communication link, the method further includes: after the ARM processor receives the OTDR data, the optical fiber detection module updates the current working pulse timing, the data interaction module updates its state to an idle state, and begins to receive the real-time level signal output by the input / output interface in the optical fiber detection module.
[0013] A second aspect of the present invention provides a handheld communication installation and maintenance terminal, the handheld communication installation and maintenance terminal including an ARM processor and a data interaction module based on FPGA design; wherein, the ARM processor is provided with an optical cable detection module, the optical cable detection module having an input / output interface and a data interface, the data interaction module having a selector, a programming input interface and an OTDR input interface, the selection end of the selector being connected to the input / output interface, the output end of the selector being connected to the data interface, and the input end of the selector being connected to the programming input interface and the OTDR input interface respectively;
[0014] The data interaction module is used to identify the current working mode of the optical cable detection module, wherein the working mode includes a programming mode and an OTDR mode; the data interaction module is also used to select one of the programming input interface and the OTDR input interface as the target input interface based on the selector according to the working mode; when the target input interface is the OTDR input interface, the optical cable detection module is used to send parameter configuration information to the data interaction module for parameter configuration operation; the data interaction module is used to configure the pulse optical signal according to the parameter configuration information and collect the feedback OTDR data through the OTDR data acquisition unit; the data interaction module is used to write the OTDR data to the ARM processor through the data interface; the data interaction module is used to write the OTDR data to the ARM processor through the OTDR data interface; when the target input interface is the programming input interface, the data interaction module is used to write the programming data input by the programming input interface to the ARM processor through the data interface.
[0015] Optionally, in a first implementation of the second aspect of the present invention, the optical cable detection module is further configured to: generate interface configuration information based on the current working pulse timing, and send the interface configuration information to the data interaction module; the data interaction module is further configured to configure the interface according to the interface configuration information, and after the configuration is completed, receive externally input data through the programming input interface and the OTDR input interface.
[0016] Optionally, in a second implementation of the second aspect of the present invention, the data interaction module includes a primary selection logic unit and a secondary selection logic unit connected to an input terminal of the primary selection logic unit, and the data interaction module includes:
[0017] The identification unit is used to determine the level value based on the real-time level signal output by the input / output interface; if the level value is a first level value, it is determined that the optical cable detection module is currently in the burning mode; if the level value is a second level value, it is determined that the optical cable detection module is currently in the OTDR mode.
[0018] The transmission unit is used to acquire the data preparation signal at the output of the secondary selection logic unit and determine whether the data preparation signal meets the preset reporting conditions. If it does not meet the conditions, the parameter configuration operation continues, and the OTDR data is continuously received through the secondary selection logic unit and processed by the OTDR data processing unit. If the conditions are met, the data reporting operation is enabled, the parameter configuration operation is disabled, and the OTDR data input by the OTDR input interface is transmitted to the ARM processor based on the second communication link.
[0019] The update unit is used to update the current working pulse timing after the ARM processor has received the OTDR data, update the state of the data interaction module to the idle state, and start receiving the real-time level signal output by the input / output interface in the optical cable detection module.
[0020] Optionally, in a third implementation of the second aspect of the present invention, the identification unit is specifically used for: if the working mode is a burning mode, determining the burning input interface as the target input interface; establishing a first communication link between the data interface and the burning input interface; or, if the working mode is an OTDR mode, determining the OTDR input interface as the target input interface; establishing a second communication link between the data interface and the OTDR input interface.
[0021] Optionally, in a fourth implementation of the second aspect of the present invention, the transmission unit is specifically used for: storing the processed OTDR data in a preset location and monitoring the amount of data in the preset location; after the amount of data reaches a preset value, the secondary selection logic unit updates the data preparation signal to meet the reporting conditions; based on the data preparation signal that meets the reporting conditions, enables the data reporting operation, and transmits the OTDR data stored in the preset location to the ARM processor through the second communication link.
[0022] Optionally, in a fifth implementation of the second aspect of the present invention, the transmission unit is further configured to: when the data preparation signal meets the reporting conditions, determine whether the data preparation signal is a high-level signal; if not, issue an alarm signal to indicate an error in the data reporting operation; if yes, receive the data preparation signal, and based on the data preparation signal, disable parameter configuration operation, transmit the OTDR data stored in a preset location to the ARM processor through the second communication link, and update the real-time level signal output by the input / output interface.
[0023] A third aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the data interaction method described above.
[0024] The data interaction method provided by this invention is applied to a handheld communication installation and maintenance terminal, including an ARM processor and a data interaction module based on FPGA design. The ARM processor includes an optical cable detection module with an input / output interface and a data interface. The data interaction module includes a selector, a programming input interface, and an OTDR input interface. The selector's selection end is connected to the input / output interface, its output end is connected to the data interface, and its input end is connected to both the programming input interface and the OTDR input interface. The data interaction method includes: the data interaction module selecting one of the programming input interface and the OTDR input interface as the target input interface based on the optical cable detection module's operating mode; if the target input interface is the OTDR input interface, the optical cable detection module sends parameter configuration information to the data interaction module for parameter configuration; the data interaction module configures a pulsed light signal according to the parameter configuration information and acquires the feedback OTDR data through the OTDR data acquisition unit; the data interaction module writes the OTDR data to the ARM processor through the data interface; if the target input interface is the programming input interface, the data interaction module writes the programming data input from the programming input interface to the ARM processor through the data interface. This method expands the interface for the ARM by adding a data interaction module and performs interface arbitration for parameter configuration and data reporting. This solves the problem that the existing handheld communication maintenance terminals have a single interface and cannot achieve compatible interaction of multiple data types, thus ensuring the stability of data transmission of different types. Attached Figure Description
[0025] Figure 1 A schematic diagram of the first embodiment of the data interaction method provided by the present invention;
[0026] Figure 2 A schematic diagram of a second embodiment of the data interaction method provided by the present invention;
[0027] Figure 3 A logical design diagram of a handheld communication installation and maintenance terminal provided in an embodiment of the present invention;
[0028] Figure 4 A flowchart of data processing provided for embodiments of the present invention;
[0029] Figure 5 A flowchart of interface arbitration provided in an embodiment of the present invention;
[0030] Figure 6 This is a schematic diagram of the first structure of a handheld communication installation and maintenance terminal provided in an embodiment of the present invention;
[0031] Figure 7 This is a schematic diagram of a second structure of the handheld communication maintenance terminal provided in an embodiment of the present invention;
[0032] Figure 8 This is a schematic diagram of a third structure of a handheld communication maintenance terminal provided in an embodiment of the present invention. Detailed Implementation
[0033] In response to existing data interaction methods, this application adds a data interaction module, establishes a two-level selection logic to implement the ARM extension interface and the interface arbitration for parameter configuration and data reporting, thereby realizing the acquisition and reporting of OTDR data, improving data interaction efficiency and the stability of data transmission of different types.
[0034] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0035] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 A schematic diagram of the first embodiment of the data interaction method provided by this invention is shown. The method specifically includes the following steps:
[0036] 101. The data interaction module identifies the working mode of the optical cable detection module and selects one of the programming input interface and OTDR input interface as the target input interface based on the selector according to the working mode.
[0037] The optical cable detection module generates interface configuration information based on the working pulse timing and sends it to the data interaction module for interface configuration. It also receives external input data through at least two input interfaces. The interface information is determined based on the frequencies of the input and output pulses of the optical cable module's data input and output interfaces, and corresponding interface configuration information is generated and sent to the data interaction module. Specifically, the timing of the working pulses is obtained from the pre-saved pulse sequence in the handheld communication equipment maintenance terminal, or directly acquired using an external pulse timing acquisition device, or sampled using a sampler. The rising and falling edges of the working pulses from the handheld communication equipment maintenance terminal are analyzed to determine the period of the working pulses and obtain the working pulse timing sequence.
[0038] When the data interface is SPI (Serial Peripheral Interface), the ARM processor acts as the SPI Master, and the FPGA (Field-Programmable Gate Array) in the data interaction module acts as the SPI Slave for internal data interaction. During communication using the SPI interface, the ARM processor determines whether to perform data communication and what data to input / output. Specifically, the master selects the slave to communicate with and then provides a clock signal to the slave. Within each clock cycle, the master sends data on the rising or falling edge of the clock (depending on the operating mode) and reads data from the slave on the following falling or rising edge. The slave process is the reverse. The timing of the SPI interface can be obtained by acquiring the operating pulse signal to obtain a timing diagram, and the transmission mode can be determined based on the clock polarity and clock phase. Generally, the clock signal is low when idle. By establishing an ARM+FPGA, the functionality of the ARM is expanded. The FPGA is mainly used to achieve high-speed data sampling, while the ARM provides data display and human-computer interaction functions. The FPGA can be used as a peripheral device of the ARM and accessed directly through DMA (Direct Memory Access). Alternatively, the FPGA can be used as a storage device of the ARM and can be connected to an interface of the ARM via a bus.
[0039] The operating modes include a programming mode and an OTDR mode. The operating mode of the optical cable detection module is determined by acquiring the pulses from the input / output ports of the ARM at the current time and judging the level signals of the input / output interfaces on the ARM. At least two input interfaces include a programming interface and an OTDR interface. The interface configuration information is the correspondence between the input interfaces and their corresponding level values. When configuring the interfaces, the optical cable detection module can acquire the working pulses, determine the rising and falling edges of the working pulses, and determine the corresponding level values. Based on the input interfaces in the data interaction module, it determines the level values corresponding to different input interfaces. Only when the level value corresponding to a particular interface appears at the selection end will a link be established between that input interface and the ARM, enabling the reception of OTDR data from at least two input interfaces. Furthermore, the handheld communication maintenance terminal can also generate the required data format and size for different operating modes based on its working pulses, generating data reception conditions. The data reception conditions and the correspondence between the input interfaces and their corresponding level values are sent to the data interaction module as interface configuration information. The data interaction module further converts the data from the input interfaces according to the interface configuration information, ensuring that the data from the input ports meets the conditions for ARM reception.
[0040] 102. If the target input interface is an OTDR input interface, the optical cable detection module will send the parameter configuration information to the data interaction module for parameter configuration. The data interaction module will configure the pulse optical signal according to the parameter configuration information, and collect the feedback OTDR data through the OTDR data acquisition unit, and write the OTDR data to the ARM processor through the data interface.
[0041] Pulsed light signals are used for OTDR detection. The FPGA-driven light source module emits pulsed light signals corresponding to the parameter configuration information. The ARM controller uses SPI and the FPGA to control ADC data acquisition and OTDR data processing, and receives data reports from within the FPGA. The fiber optic detection module acquires the data preparation signal from the output of the secondary selection logic unit and determines whether the preset reporting conditions are met. If not, the parameter configuration operation continues. The secondary selection logic unit continuously receives OTDR data, which is then processed by the OTDR data processing unit. If the conditions are met, data reporting is enabled, parameter configuration is disabled, and the OTDR data input from the OTDR input interface is transmitted to the ARM processor via the second communication link. The data interaction module stores the processed OTDR data in a preset location and monitors the amount of data in that location. Once a preset value is reached, the data preparation signal is updated to meet the reporting conditions. Based on this data preparation signal, the fiber optic detection module enables the data reporting operation and transmits the OTDR data stored in the preset location to the ARM processor via the second communication link. When the data preparation signal meets the reporting conditions, the optical cable detection module determines whether the data preparation signal is a high-level signal. If not, it issues an alarm signal to indicate that the data reporting operation is incorrect. If it is, it receives the data preparation signal, prohibits parameter configuration operation, transmits the OTDR data stored in the preset position to the ARM processor through the second communication link, and updates the real-time level signal output by the input / output interface.
[0042] 103. If the target input interface is a programming input interface, the data interaction module will write the programming data input from the programming input interface to the ARM processor through the data interface.
[0043] When the ARM and external Flash interact via the SPI interface, the specific states of the read and write states need to be determined based on the characteristics of the Flash during read and write operations. Furthermore, while the FPGA could automatically load the program from the Flash upon power-on, it is now necessary to periodically and automatically reload the program from the Flash to the FPGA without power loss, thus enabling automatic programming of the FPGA from the Flash. Generally, for the Flash memory to write to the FPGA, it needs write protection and SPI bus access functionality. The SPI read / write control module receives instructions, addresses, and data bytes and transmits them to the Flash strictly according to the SPI protocol. It also receives data read from the Flash and sends it back to the SPI read / write control module, enabling interaction with the external Flash.
[0044] In this embodiment, the handheld communication equipment maintenance terminal (hereinafter referred to as PDA) has multiple interfaces, including at least two of the following: optical power meter interface, red light source interface, gigabit network port, SIM card port, OTDR interface, USB interface, and HDMI (High Definition Multimedia Interface) interface. Each interface corresponds to a different functional module, and each functional module is controlled by FPGA and controlled by the main control platform in the optical cable detection module through different control methods to receive data. For example, the PDA can read ID cards by adding a second-generation ID card recognition area; the front and rear cameras can receive image and video data; the microphone interface can receive external sound data and issue sound prompts; the charging interface enables wireless cyclic use of the PDA; the USB and HDMI interfaces are used to receive data of different formats from external devices; the PDA also provides a network port and a data card slot for establishing data links with external devices; for the optical power meter interface, a standard test wave is set at the optical power receiving interface to realize optical power detection and determine the loss value of the optical cable under test; for the red light source interface, the working wavelength of the emitting interface is 650±10nm, the output power is 10mW, the test distance is ≥7Km, and the modulation frequency is continuous light or 2Hz modulated light, realizing fiber optic identification and fault location. The optical cable detection module uses different receiving protocols for each functional module interface. For example, the Ethernet module has a PICE interface connected to the main control platform (ARM). The OTDR functional module is controlled by the FPGA and connects to the main control platform on the optical cable detection module via SPI to transmit data. The FPGA performs pulse control and power control based on the received data, and amplifies and filters the photocurrents generated by each photodiode and specific photocurrents. The data is then transmitted to the FPGA via infrared receiver decoding and finally to the optical cable detection module. In other words, the handheld communication and maintenance terminal in this embodiment is a handheld terminal including an optical power detection module, an infrared light detection module, an RF detection module, and an Ethernet module.
[0045] This solution utilizes an ARM+FPGA architecture. Specifically, it expands the ARM interface by configuring the interfaces of the optical cable detection module and the data interaction module. It then selects the target input interface from at least two input interfaces for data transmission, enabling the redevelopment of existing products and facilitating various types of data interaction between the FPGA and ARM.
[0046] Please see Figure 2 A schematic diagram of the second embodiment of the data interaction method provided in this invention. Figure 3The logical design diagram of the handheld communication installation and maintenance terminal provided in the embodiment of the present invention is shown. The data interface in the ARM is the SPI interface, and the input and output interface is the IO interface. The ARM not only controls the ADC data acquisition and OTDR data processing operations and receives the data reporting from the FPGA through the SPI interface, but also interacts with the external Flash through the SPI interface to realize the ARM's programming operation on the FPGA.
[0047] In this embodiment, for the FPGA design, a new interface expansion selector (i.e., the trapezoid in the figure) is added as a selection logic module. The input end of the selector has an external Flash SPI slave interface and an SPI slave interface for data interaction within the FPGA (i.e., the SPI interface driver module in the figure). The selection end is connected to the single-bit IO interface (input-output interface) of the ARM expansion, and the output end is connected to the ARM's SPI master interface. The SPI slave interface for data interaction within the FPGA and the SPI master interface of the ARM are bidirectional channels. The selection end selects an SPI slave device from the input end interface based on the signal of the input-output interface as the sole SPI slave device for communication with the master device on the ARM.
[0048] Furthermore, an SPI interface driver module is also set up inside the FPGA. The internal SPI interaction module design of the secondary selection logic module has the following inputs: the output of the parameter configuration module, the data output of the OTDR data module, and the SPI interface for ARM. The outputs are the input of the parameter configuration module, the SPI interface for ARM, and the single-bit I / O port extended by ARM. The SPI interface driver module receives the parameter configuration information sent by ARM through the SPI interface for ARM. The parameter configuration module performs write configuration operations through the input and sends the configuration information to the acquisition module and the processing module. The parameter configuration module also performs read configuration operations on the SPI interface driver module through the output, thereby realizing the read and write configuration operations inside the FPGA. After the acquisition and processing modules perform corresponding acquisition and processing operations according to the configuration information, the final OTDR data is sent to the SPI interface driver module. The SPI interface driver module stores data in a fixed location. When the data storage reaches the reporting condition, the SPI interface driver module generates a data preparation signal and sends it to the IO interface in the ARM. In the first-level selection logic module, the IO signal generated by the IO interface can control the data input to the ARM through the selector's selection terminal. When the IO signal changes, the selector selects the corresponding SPI slave device to interact with the ARM. In the second-level selection logic module, the module defaults to simple read / write configuration interaction via SPI. At this time, the ARM sends some OTDR parameters, such as pulse width and data sampling length, to the FPGA. The FPGA configures the transmission of the corresponding pulse based on this information and, through the ADC interface (data acquisition), receives the returned feedback signal as data. After data acquisition, it passes through the OTDR function module for relevant data processing. Specifically, the OTDR data acquisition unit acquires OTDR data, the OTDR data processing unit processes the acquired data, and after processing, it connects to the data interface on the optical cable detection module through the OTDR input interface to send the OTDR data.
[0049] In this logic design, with only one SPI interface on the ARM, the FPGA architecture divides the SPI transmission path into two levels of selection logic modules: an extended selector for the SPI interface and an adjudication selection module for parameter transmission and data reporting between the SPI and the FPGA. For the first-level selection logic module, the ARM can switch the input signal of the selector by controlling the high and low levels of a single-bit IO signal. The second-level selection logic module, in turn, controls the input selection by influencing the high and low levels of the single-bit IO signal.
[0050] Existing handheld communication and maintenance terminals use memory read / write for parameter configuration, directly reading parameters using read / write addresses and read / write enable methods. Data reporting uses DMA as an interface to report processed data to the processor for further processing. This solution, however, uses a less resource-intensive FPGA chip and retains only OTDR functionality, an ADC interface for data acquisition, and an SPI interface for parameter configuration and external processor interaction. Communication between the FPGA and ARM is also handled through a single SPI interface for parameter configuration, data reporting, and program programming.
[0051] The method specifically includes the following steps:
[0052] 201. The first-level selection logic unit determines the level value based on the real-time level signal output from the input / output interface, and determines the corresponding working mode based on the correspondence between the level value and the working mode.
[0053] The first-level selection logic unit acquires the real-time pulse signal output by the optical cable detection module and determines the corresponding working mode based on the preset correspondence between the working mode and the pulse signal value. The data interaction module also includes the first-level selection logic unit. It determines the pulse signal value of the real-time pulse signal; if the pulse signal value is the first level value, it determines that the optical cable detection module is currently in the programming mode based on the preset correspondence between the working mode and the pulse signal value; if the pulse signal value is the second level value, it determines that the optical cable detection module is currently in OTDR mode based on the preset correspondence between the working mode and the pulse signal value. If the level signal is low, it disconnects the selector from the external programming module and connects the selector's input to the FPGA's SPI slave interface; the ARM generates corresponding parameter information based on the type of data to be acquired and the target data representation, and sends it to the data acquisition module and the data processing module; the data acquisition module and the data processing module generate corresponding pulses and acquire data based on the parameter information; the data processing module performs corresponding processing based on the parameter information and the acquired data; the FPGA samples the received external pulse signal, processes the sampling results, and uploads the processed data to the ARM.
[0054] After the interface configuration of the optical cable detection module and the data interaction module is completed, the correspondence between the input interface and the level value is obtained. The unique interactive input interface is determined by the level value, thereby determining the working mode. Furthermore, the pulse timing diagram of the optical cable detection module is acquired by the acquisition module to determine the pulse signal value of the optical cable detection module at the current time point. In this scheme, the pulse signal value includes a first level value, i.e., a high level value, which is determined to be 1, and a second level value, i.e., a low level value, which is determined to be 0. The first level value corresponds to the burning mode, and the second level value corresponds to the OTDR mode.
[0055] 202. Based on the working mode, determine the target input interface from at least two input interfaces, and transmit the data input from the target input interface to the optical cable detection module.
[0056] If the operating mode is programming mode, the interface corresponding to the first level value is selected from the input interfaces of the first-level selection logic unit as the target input interface; a communication link is established between the data transmission interface and the target input interface in the optical cable detection module; and the program data input from the target input interface is written to the ARM processor based on the communication link. If the operating mode is OTDR mode, the interface corresponding to the second level value is selected from the input interfaces of the first-level selection logic unit as the target input interface; a communication link is established between the data transmission interface and the target input interface in the optical cable detection module, and the OTDR data input from the target input interface is written to the ARM processor, where the OTDR data is the waveform data of the optical signal obtained from the optical fiber by the second-level selection logic unit.
[0057] When the operating mode is OTDR mode, the data preparation signal from the output interface of the secondary selection logic unit is acquired, and it is determined whether the data preparation signal meets the preset reporting conditions. If it does, the optical cable detection module enables the data reporting operation, disables the read / write configuration operation, and writes the OTDR data input from the target input interface to the ARM processor based on the communication link. If it does not meet the conditions, the optical cable detection module enables the read / write configuration operation, continuously receives and processes OTDR data through the secondary selection logic unit, stores the processed OTDR data in a preset location, and monitors the amount of data in the preset location. After the amount of data reaches the preset value, the secondary selection logic unit outputs the data preparation signal that meets the reporting conditions, enables the data reporting operation, and writes the OTDR data input from the target input interface to the ARM processor based on the communication link.
[0058] Please see Figure 4The data processing flowchart provided in this embodiment of the invention shows that the FPGA first determines the SPI selection link. If the ARM's IO signal is 1, it will stop interacting with the FPGA signal processing module and switch to interacting with the external Flash's SPI. If this IO signal is 0, it will interact with the FPGA normally. After the FPGA completes data processing, it generates a data preparation signal and sends it to the ARM through the SPI interface. The ARM controls the selector to establish a connection with the FPGA's SPI interface based on the data preparation signal. The FPGA sends the processed data to the ARM through the SPI interface. The flowchart also checks whether the ARM has completed the data reception operation. If it has, it pulls a high-level signal, disconnects the connection with the FPGA's SPI slave interface, and establishes a connection with the external programming module. The process also checks another IO signal—the data preparation signal in the output interface of the secondary selection logic unit. This signal is mainly used to indicate whether the data has been fully processed and is ready to be reported to the ARM after the OTDR calculation is completed. Therefore, when this signal is 0, the optical fiber detection module enables read / write configuration operation, continuously receiving and processing OTDR data through the secondary selection logic unit. The ARM can configure the FPGA parameters to instruct the corresponding data acquisition and processing modules to operate. After the data processing is completed and cached in the corresponding memory, the data preparation signal is pulled high by the FPGA to meet the data reporting conditions and is recognized by the ARM. At this time, the ARM disables the read / write configuration operation and begins receiving the processed data. After the processed data has been received, the FPGA returns to the idle state, waiting for ARM control.
[0059] Please see Figure 5 The flowchart of the interface arbitration provided in this embodiment of the invention shows that the interface architecture design prioritizes determining whether the external SPI is selected based on the real-time pulse signal output by the optical fiber detection module (IO port signal). If selected, it connects to the external SPI, and the SPI interface of the internal FPGA is disconnected. Conversely, when the real-time pulse signal output by the optical fiber detection module is 0, the external SPI is not selected, and the FPGA and ARM interact normally. In the SPI interface module of the architecture design, the memory of the OTDR reported data is judged and fed back to the data preparation signal in the output interface of the secondary selection logic unit (IO signal). If the data storage is complete, the data preparation signal in the output interface of the secondary selection logic unit is pulled high by the FPGA, telling the ARM to stop parameter configuration reading and writing and start receiving reported data. However, when the data is not processed, the ARM can arbitrarily operate the FPGA configuration.
[0060] 203. After the ARM processor receives the OTDR data, the optical fiber detection module updates the current working pulse timing, the data interaction module updates its status to idle, and begins to receive the real-time level signals output by the input / output interface of the optical fiber detection module.
[0061] In this embodiment, when determining the working status of the optical cable detection module, the FPGA status is first determined. The FPGA status includes: IDLE (idle state, waiting for the read / write control module to initiate a data transmission request); READY (ready to transmit data); TRANS (data transmission state, sending or receiving data according to the SPI protocol); and DONE (data transmission completed). Normally, the FPGA's state transition path is as follows: when the FPGA is in an idle state, it is powered on by setting other events as trigger conditions. In this solution, when the FPGA is in an idle state, it waits for ARM control. The ARM controls its output level through I / O signals, causing its state to transition to the ready-to-transmit-data state. At this time, the FPGA's parameter configuration read / write operations are paused, the ARM is notified to prepare to receive data, data transmission begins, and after data transmission is completed, the FPGA's status is updated back to the idle state. When the FPGA is idle, the system acquires the input / output (I / O) level signals from the ARM. A high-level signal confirms the FPGA's idle state, and the selector's input is connected to an external programming module for data writing. A low-level signal connects the selector's input to the FPGA's SPI slave interface for data acquisition and processing. Data reporting and read / write configuration arbitration are then performed based on the SPI slave interface's data preparation signal. Furthermore, based on the overall interface architecture design, more SPI interfaces can be added as needed. If the FPGA hardware capabilities allow, increasing the bit width of the IO signal spi-sel increases the range of selectable SPI interfaces by powers of two.
[0062] This solution establishes interaction between the ARM and FPGA by setting up a two-level selection logic. At the same time, the output of the second-level selection logic module affects the selection logic module by sending signals to the ARM's IO interface, thus expanding the ARM's interface and enabling the ARM to select and switch operating modes.
[0063] The data interaction method in the embodiments of the present invention has been described above. The handheld communication installation and maintenance terminal in the embodiments of the present invention will be described in detail below from the perspective of modular functional entities. Please refer to [link / reference]. Figure 6The first structural diagram of the handheld communication installation and maintenance terminal provided in this embodiment of the invention includes an ARM processor and a data interaction module 620 based on FPGA design. The ARM processor is equipped with an optical cable detection module 610, which has an input / output interface and a data interface. The data interaction module is equipped with a selector, a programming input interface and an OTDR input interface. The selection end of the selector is connected to the input / output interface, the output end of the selector is connected to the data interface, and the input end of the selector is connected to the programming input interface and the OTDR input interface, respectively.
[0064] The data interaction module 620 is used to identify the current working mode of the optical cable detection module, wherein the working mode includes a programming mode and an OTDR mode; it is also used to select one of the programming input interface and the OTDR input interface as the target input interface based on the selector according to the working mode.
[0065] When the target input interface is an OTDR input interface, the optical cable detection module 610 is used to send parameter configuration information to the data interaction module for parameter configuration operation; the data interaction module 620 is used to configure the pulse optical signal according to the parameter configuration information, and to collect the feedback OTDR data through the OTDR data acquisition unit; the data interaction module 620 is also used to write the OTDR data to the ARM processor through the data interface;
[0066] When the target input interface is a programming input interface, the data interaction module 620 is used to write the programming data input by the programming input interface into the ARM processor through the data interface.
[0067] This solution expands the ARM interface by configuring the interfaces of the optical cable detection module and the data interaction module, and determines the target input interface from at least two input interfaces for data transmission, thereby realizing the redevelopment of existing products and enabling various types of data interaction between the FPGA and the ARM.
[0068] Please see Figure 7 The present invention provides a second structural schematic diagram of a handheld communication installation and maintenance terminal. The handheld communication installation and maintenance terminal includes an ARM processor and a data interaction module 720 based on FPGA design. The ARM processor is equipped with an optical cable detection module 710, which has an input / output interface and a data interface. The data interaction module is equipped with a selector, a programming input interface, and an OTDR input interface. The selection end of the selector is connected to the input / output interface, the output end of the selector is connected to the data interface, and the input end of the selector is connected to the programming input interface and the OTDR input interface, respectively.
[0069] The data interaction module 720 is used to identify the current working mode of the optical cable detection module, wherein the working mode includes a programming mode and an OTDR mode; it is also used to select one of the programming input interface and the OTDR input interface as the target input interface based on the selector according to the working mode.
[0070] When the target input interface is an OTDR input interface, the optical cable detection module 710 is used to send parameter configuration information to the data interaction module for parameter configuration operation; the data interaction module 720 is used to configure the pulse optical signal according to the parameter configuration information, and to collect the feedback OTDR data through the OTDR data acquisition unit; the data interaction module 720 is also used to write the OTDR data to the ARM processor through the data interface;
[0071] When the target input interface is a programming input interface, the data interaction module 720 is used to write the programming data input by the programming input interface into the ARM processor through the data interface.
[0072] In this embodiment, the data interaction module 720 includes:
[0073] The identification unit 721 is used to determine the level value based on the real-time level signal output by the input / output interface; if the level value is a first level value, it is determined that the optical cable detection module is currently in the burning mode; if the level value is a second level value, it is determined that the optical cable detection module is currently in the OTDR mode.
[0074] The transmission unit 722 is used to acquire the data preparation signal at the output terminal of the secondary selection logic unit and determine whether the data preparation signal meets the preset reporting conditions. If it does not meet the conditions, the parameter configuration operation continues, and the OTDR data is continuously received through the secondary selection logic unit and processed by the OTDR data processing unit. If the conditions are met, the data reporting operation is enabled, the parameter configuration operation is disabled, and the OTDR data input by the OTDR input interface is transmitted to the ARM processor based on the second communication link.
[0075] The update unit 723 is used to update the current working pulse timing after the ARM processor has received the OTDR data, update the state of the data interaction module to the idle state, and start receiving the real-time level signal output by the input / output interface in the optical cable detection module.
[0076] In this embodiment, the identification unit 721 is specifically used for: if the working mode is a burning mode, determining the burning input interface as the target input interface; establishing a first communication link between the data interface and the burning input interface; if the working mode is an OTDR mode, determining the OTDR input interface as the target input interface; and establishing a second communication link between the data interface and the OTDR input interface.
[0077] In this embodiment, the transmission unit 722 is specifically used for: storing the processed OTDR data in a preset location and monitoring the amount of data in the preset location; after the amount of data reaches a preset value, the secondary selection logic unit updates the data preparation signal to meet the reporting conditions; based on the data preparation signal that meets the reporting conditions, the data reporting operation is enabled, and the OTDR data stored in the preset location is transmitted to the ARM processor through the second communication link.
[0078] In this embodiment, the transmission unit 722 is further configured to: determine whether the data preparation signal is a high-level signal when the data preparation signal meets the reporting conditions; if not, issue an alarm signal to indicate that the data reporting operation is incorrect; if yes, receive the data preparation signal, and based on the data preparation signal, disable parameter configuration operation, transmit the OTDR data stored in the preset position to the ARM processor through the second communication link, and update the real-time level signal output by the input / output interface.
[0079] This solution establishes interaction between the ARM and FPGA by setting up a two-level selection logic. At the same time, the output of the second-level selection logic module affects the selection logic module by sending signals to the ARM's IO interface, thus expanding the ARM's interface and enabling the ARM to select and switch operating modes.
[0080] above Figure 6-7 The handheld communication equipment maintenance terminal in this embodiment of the invention is described in detail from the perspective of modular functional entities. The handheld communication equipment maintenance terminal in this embodiment of the invention is described in detail below from the perspective of hardware processing.
[0081] Figure 8This is a schematic diagram of a third structure of the handheld communication installation and maintenance terminal provided in this embodiment of the invention. The handheld communication installation and maintenance terminal 800 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 810 (e.g., one or more processors) and a memory 820, and one or more storage media 830 (e.g., one or more mass storage devices) for storing application programs 833 or data 832. The memory 820 and storage media 830 can be temporary or persistent storage. The program stored in the storage media 830 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the handheld communication installation and maintenance terminal 800. Furthermore, the processor 810 may be configured to communicate with the storage media 830 and execute the series of instruction operations in the storage media 830 on the handheld communication installation and maintenance terminal 800 to implement the method provided in the above embodiment.
[0082] The handheld communication installation and maintenance terminal 800 may also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input / output interfaces 860, and / or one or more operating devices 831, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 8 The handheld communication equipment maintenance terminal structure shown does not constitute a limitation on the handheld communication equipment maintenance terminal provided by the present invention. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0083] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the various steps of the data interaction method provided in the above embodiments.
[0084] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described equipment or apparatus / unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0085] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0086] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data interaction method applied to a handheld communication installation and maintenance terminal, characterized in that, The handheld communication maintenance terminal includes an ARM processor and a data interaction module based on FPGA design. The ARM processor has an optical cable detection module with an input / output interface and a data interface. The data interaction module has a selector, a programming input interface, and an OTDR input interface. The selector's selection end is connected to the input / output interface, the selector's output end is connected to the data interface, and the selector's input end is connected to the programming input interface and the OTDR input interface, respectively. The data interaction method includes: The data interaction module identifies the current working mode of the optical cable detection module, wherein the working mode includes a programming mode and an OTDR mode; According to the working mode, the data interaction module selects one of the programming input interface and the OTDR input interface as the target input interface based on the selector; If the target input interface is an OTDR input interface, the optical cable detection module sends the parameter configuration information to the data interaction module for parameter configuration. The data interaction module configures the pulse optical signal according to the parameter configuration information and collects the feedback OTDR data through the OTDR data acquisition unit. The data interaction module writes the OTDR data to the ARM processor through the data interface. If the target input interface is a programming input interface, the data interaction module writes the programming data input by the programming input interface into the ARM processor through the data interface.
2. The data interaction method according to claim 1, characterized in that, Before the data interaction module identifies the current operating mode of the optical cable detection module, the following is also included: The optical cable detection module generates interface configuration information based on the current working pulse timing and sends the interface configuration information to the data interaction module; The data interaction module configures the interface according to the interface configuration information, and after the configuration is completed, it receives externally input data through the burning input interface and the OTDR input interface.
3. The data interaction method according to claim 1, characterized in that, The data interaction module includes a first-level selection logic unit; The data interaction module identifies the current operating mode of the optical cable detection module, including: The first-level selection logic unit determines the level value based on the real-time level signal output by the input / output interface; If the voltage level is the first voltage level, then the first-level selection logic unit determines that the optical cable detection module is currently in the programming mode; If the voltage level is the second voltage level, then the first-level selection logic unit determines that the optical cable detection module is currently in OTDR mode.
4. The data interaction method according to claim 3, characterized in that, The data interaction module, based on the operating mode, selects one of the programming input interface and the OTDR input interface as the target input interface using the selector, including: If the working mode is the burning mode, the first-level selection logic unit determines the burning input interface as the target input interface; the first-level selection logic unit establishes a first communication link between the data interface and the burning input interface; If the operating mode is OTDR mode, the first-level selection logic unit determines the OTDR input interface as the target input interface; the first-level selection logic unit establishes a second communication link between the data interface and the OTDR input interface.
5. The data interaction method according to claim 4, characterized in that, The data interaction module also includes a secondary selection logic unit connected to an input terminal of the primary selection logic unit; The data interaction module writes the OTDR data to the ARM processor via the data interface, including: The optical cable detection module acquires the data preparation signal at the output of the secondary selection logic unit and determines whether the data preparation signal meets the preset reporting conditions. If the conditions are not met, the optical cable detection module continues the parameter configuration operation, continuously receives OTDR data through the secondary selection logic unit, and processes the OTDR data through the OTDR data processing unit; If the conditions are met, the optical cable detection module enables data reporting, disables parameter configuration, and transmits the OTDR data input through the OTDR input interface to the ARM processor via the second communication link.
6. The data interaction method according to claim 5, characterized in that, If the above conditions are not met, the optical cable detection module continues parameter configuration operations. After continuously receiving OTDR data through the secondary selection logic unit and processing the OTDR data through the OTDR data processing unit, the module further includes: The data interaction module stores the processed OTDR data in a preset location and monitors the amount of data in the preset location; After the amount of data reaches a preset value, the secondary selection logic unit updates the data preparation signal to meet the reporting conditions. The optical cable detection module initiates a data reporting operation based on the data preparation signal that meets the reporting conditions, and transmits the OTDR data stored in the preset location to the ARM processor through the second communication link.
7. The data interaction method according to claim 6, characterized in that, The optical cable detection module, based on the data preparation signal that meets the reporting conditions, initiates a data reporting operation and transmits the OTDR data stored in a preset location to the ARM processor via the second communication link, including: When the data preparation signal meets the reporting conditions, the optical cable detection module determines whether the data preparation signal is a high-level signal; If not, the optical cable detection module will issue an alarm signal, indicating an error in the data reporting operation; If so, the optical cable detection module receives the data preparation signal, disables parameter configuration operation based on the data preparation signal, transmits the OTDR data stored in the preset position to the ARM processor through the second communication link, and updates the real-time level signal output by the input / output interface.
8. The data interaction method according to claim 5, characterized in that, After the first-level selection logic unit writes the OTDR data input from the OTDR input interface to the ARM processor based on the communication link, the process further includes: After the ARM processor receives the OTDR data, the optical fiber detection module updates the current working pulse timing, the data interaction module updates its state to idle, and begins to receive the real-time level signal output by the input / output interface of the optical fiber detection module.
9. A handheld communication and maintenance terminal, characterized in that, The handheld communication maintenance terminal includes an ARM processor and a data interaction module based on FPGA design. The ARM processor has an optical cable detection module with an input / output interface and a data interface. The data interaction module has a selector, a programming input interface, and an OTDR input interface. The selector's selection end is connected to the input / output interface, the selector's output end is connected to the data interface, and the selector's input end is connected to the programming input interface and the OTDR input interface, respectively. The data interaction module is used to identify the current working mode of the optical cable detection module, wherein the working mode includes a burning mode and an OTDR mode; The data interaction module is also used to select one of the burning input interface and the OTDR input interface as the target input interface based on the selector according to the working mode; When the target input interface is an OTDR input interface, the optical cable detection module is used to send parameter configuration information to the data interaction module for parameter configuration operation; the data interaction module is used to configure the pulse optical signal according to the parameter configuration information and collect the feedback OTDR data through the OTDR data acquisition unit; the data interaction module is used to write the OTDR data to the ARM processor through the data interface; When the target input interface is a programming input interface, the data interaction module is used to write the programming data input by the programming input interface into the ARM processor through the data interface.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the data interaction method as described in any one of claims 1-8.