A multiplexing framing method, device and terminal equipment

By customizing the cache depth, bit width, and check calculation method, and combining the framing method of frame header, frame data, and frame tail information, the problem of development difficulty and high cost of frame cache design in complex application scenarios is solved, and the Flexible and efficient frame cache design.

CN118473601BActive Publication Date: 2024-10-11CHENGDU TYTANTEST TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410911707.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-11
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

In complex application scenarios, the design and development of frame cache is difficult, the development cycle is long, and the cost is high.

Method used

Provide a multiplexing framing method and device, through the depth and bit width configuration interface and the verification mode configuration interface, customize the cache space and verification calculation method, combine the frame header, frame data and frame tail information for framing, and Frame data is output through the read interface to adapt to various application scenarios.

Benefits of technology

It reduces the development difficulty and cost of frame cache design, shortens the development cycle, meets the needs of multi-functional application scenarios, and improves development efficiency and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118473601B_ABST
    Figure CN118473601B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data communication technology, and in particular to a multiplexing framing method, device and terminal equipment. The device includes: receiving the depth and bit width of the cache space configured according to the requirements through the depth and bit width configuration interface, receiving the verification calculation method configured according to the requirements through the verification method configuration interface; receiving the frame header information, frame data information and frame tail information through the input interfaces corresponding to the frame header, frame data and frame tail respectively, and adding the frame identifier, and then storing the frame header information, frame data information, frame tail information and frame identifier in the cache space respectively; framing according to the frame header information, frame data information, frame tail information and frame identifier, calculating the verification value of the current frame according to the verification calculation method when framing, and the verification value is used to assemble into the current frame; storing the current frame after framing in the storage space can solve the problems of difficulty, long cycle and high cost in framing and caching development in complex application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data communication technology, and in particular to a multiplexing framing method, device and terminal equipment. Background Art

[0002] In digital logic development, when the application scenario involves communication interaction, in order to meet the protocol requirements, it is necessary to design related functions such as framing and storing frames. During the development process, when encountering scenarios that require framing and caching operations, it is generally necessary to directly perform related logic designs such as framing, caching frames, and reading frames according to the needs of the application scenario. This method is feasible for simple application scenarios. However, if the types and numbers of application scenario functions are complex and diverse, doing so obviously requires a lot of effort and time, resulting in increased development difficulty and extended cycles. Therefore, in complex scenarios, a multiplexed frame cache design with customized depth and content is important. This design can reduce development difficulty and cost and shorten the product development process. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a multiplexing framing method, apparatus and terminal device, which can effectively solve the problems of high difficulty, long development cycle and high cost in the design and development of framing cache in existing complex functional application scenarios.

[0004] In a first aspect, an embodiment of the present application provides a multiplexing framing method, comprising the following steps:

[0005] The depth and width of the cache space configured according to the requirements are received through the depth and width configuration interface, and the verification calculation method configured according to the requirements is received through the verification method configuration interface;

[0006] Receive frame header information, frame data information and frame tail information respectively through input interfaces corresponding to the frame header, frame data and frame tail, add a frame identifier, and then store the frame header information, frame data information, frame tail information and frame identifier in the cache space respectively;

[0007] Frame assembly is performed according to the frame header information, frame data information, frame tail information and frame identifier, and when framing, a check value of the current frame is calculated according to the check calculation method, and the check value is used to assemble into the current frame;

[0008] The current frame after framing is stored in the storage space.

[0009] In some embodiments, the method further includes reading and outputting a frame from the cache space according to the frame identifier through a read interface; the frame includes frame header information, frame data information, a check value, frame tail information and a frame identifier.

[0010] In some embodiments, when the frame header information, frame data information, frame tail information and frame identifier are stored in the cache space respectively, it also includes:

[0011] Record the total length of the input frames;

[0012] The method further includes receiving a configured read cache threshold, and determining to output a read signal through a read ready interface according to the read cache threshold and the total length of the input frame; the read signal is used for an external module to determine to read a frame;

[0013] Under the drive of the external module, a frame is read from the cache space through a read interface according to the frame identifier and output to the external module.

[0014] In some embodiments, the frame identifier includes a frame header identifier and a frame tail identifier; the frame tail information includes an initial frame tail mark, and the frame tail identifier is determined based on the initial frame tail mark; when outputting the frame tail to the external module, it includes outputting a frame tail indication signal.

[0015] In a second aspect, an embodiment of the present application provides a multiplexing framing device, the device comprising: a framing logic module, a check calculation logic module, a write cache logic module and a cache management module; the framing logic module is provided with an input interface;

[0016] The cache management module includes a depth and bit width configuration interface; the cache management module is used to receive the configured depth and bit width through the depth and bit width configuration interface, and configure the size of the cache space and the bit width of each frame according to the depth and bit width;

[0017] The framing logic module is used to receive frame header information, frame data information and frame tail information through input interfaces corresponding to the frame header, frame data and frame tail, respectively, and add a frame identifier, and then store the frame header information, frame data information, frame tail information and frame identifier into the cache space respectively;

[0018] The check calculation logic module includes a check mode configuration interface; the check calculation logic module is used to receive the check calculation mode configured through the check mode configuration interface, and calculate the check value of the current frame according to the check calculation mode when the framing logic module performs framing, and the check value is used to encapsulate the current frame;

[0019] The write cache logic module is used to store the current frame after framing into the storage space; the current frame after framing includes the frame header information, frame data information, frame tail information, check value and frame identifier.

[0020] In some embodiments, the apparatus further comprises a read cache logic module; the read cache logic module comprises a read interface;

[0021] The read cache logic module is used to read and output a frame from the cache space according to the frame identifier through a read interface; the frame includes frame header information, frame data information, a check value, frame tail information and a frame identifier.

[0022] In some embodiments, the write cache logic module is further used to record the total length of the input frames; the read cache logic module also includes a read ready interface and a read cache threshold configuration interface;

[0023] The read cache logic module is specifically used to receive the configured read cache threshold, and determine to output a read signal through the read ready interface according to the read cache threshold and the total length of the input frame; the read signal is used for the external module to determine to read the frame;

[0024] The read cache logic module is used to read frames from the cache space through the read interface according to the frame identifier under the drive of the frame read task of the external module and output the frames to the external module.

[0025] In some embodiments, the frame identifier includes a frame header identifier and a frame tail identifier; the frame tail information includes an initial frame tail mark, and the frame tail identifier is determined based on the initial frame tail mark; the read cache logic module outputs a frame tail indication signal when outputting the frame tail.

[0026] In some embodiments, the check calculation method in the check calculation logic module includes at least one of cumulative sum, cumulative difference, parity check, and bitwise exclusive OR.

[0027] In a third aspect, an embodiment of the present application provides a terminal device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement a multiplexing framing method provided in the first aspect of the present application.

[0028] The embodiments of the present application have the following beneficial effects:

[0029] In order to meet the application requirements of different functions in complex scenes in the project, this application has made a customized reusability design for functions such as framing and caching. For external modules, this application provides a depth and width configuration interface and a check mode configuration interface to customize the cache depth and width according to business needs and customize the check calculation method used. This application also provides a frame header input interface, a frame data input interface and a frame tail input interface for external modules to customize framing parameters and content according to needs. Then, the framing logic module is used to framing and stored in the cache space, the cache management module is used to manage the cache according to the depth and width, the check calculation logic module is used to check and store the check results, and the write cache logic module is used to store the frame header, frame data, frame tail, check value, frame identification, etc. The contents of the depth and width configuration interface, check mode configuration interface, frame header input interface, frame data input interface and frame tail input interface of this application can be customized according to needs, which can meet a variety of application scenarios. Therefore, this application can effectively solve the problems of high difficulty, long development cycle and high cost in the design and development of framing cache in existing complex functional application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 A structural block diagram of a multiplexing framing device according to an embodiment of the present application is shown;

[0032] Figure 2 Another structural block diagram of the multiplexing framing device according to an embodiment of the present application is shown;

[0033] Figure 3 A schematic flow chart of a multiplexing framing method according to an embodiment of the present application is shown.

[0034] Description of main component symbols:

[0035] 110 - cache management module; 120 - framing logic module; 130 - verification calculation logic module; 140 - write cache logic module; 150 - cache space; 160 - read cache logic module. DETAILED DESCRIPTION

[0036] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0037] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0038] Hereinafter, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.

[0039] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.

[0040] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0041] In the prior art, when designing a frame buffer, the logic design related to frame assembly, frame buffering, frame reading, etc. is directly performed according to the needs of the application scenario. However, for complex scenarios with a large number of functions, multiple frame logic designs and frame buffer designs are required, resulting in problems such as high development difficulty, long development cycle, and high cost. Therefore, the present application provides a multiplexed frame assembly method, device, and terminal device, which can effectively solve the problem that the multi-functional external output in complex scenarios requires multiple frame logic designs and frame buffer designs, resulting in high development difficulty, long development cycle, and high cost of frame buffer design.

[0042] In order to meet the application requirements of different functions in complex scenarios in engineering, this application has made a customized reusable design for functions such as framing and caching. The main idea of ​​this application is to utilize the control of storage space in the chip and the configurable framing logic design to customize the cache space size and framing content of the use case, and provide an adaptable and reusable framing cache design for different functional scenarios.

[0043] The multiplexing frame assembly device is described below in conjunction with some specific embodiments.

[0044] Figure 1 A structural block diagram of a multiplexing framing device according to an embodiment of the present application is shown. Exemplarily, the multiplexing framing device comprises: a buffer management module 110 , a framing logic module 120 , a checksum calculation logic module 130 and a write buffer logic module 140 .

[0045] The cache management module 110 includes a depth and bit width configuration interface; the cache management module 110 is used to receive the configured depth and bit width through the depth and bit width configuration interface, and configure the size of the cache space 150 and the bit width of each frame according to the depth and bit width.

[0046] Specifically, when designing the cache management module 110, a depth and bit width configuration interface is provided to set the size of the frame cache space 150 and the bit width of each base frame unit content, wherein the depth and bit width can be customized according to requirements to be applied to different functional scenarios.

[0047] The framing logic module 120 is provided with an input interface. The framing logic module 120 is used to receive frame header information, frame data information and frame tail information through the input interfaces corresponding to the frame header, frame data and frame tail respectively, and add a frame identifier, and then store the frame header information, frame data information, frame tail information and frame identifier into the cache space 150 respectively. Framing includes adding a frame header and a frame tail to the front and back parts of the frame data information. The frame header and the frame tail contain a lot of control information, for example, for frame delimitation to determine the boundaries of the frame, and for frame synchronization, that is, the receiver should be able to distinguish the start and end of the frame from the received binary bit stream (frame synchronization is for the receiver). In addition, a frame identifier needs to be added for identification when reading the frame.

[0048] Specifically, when designing the framing logic module 120, an input interface is provided to the outside, and the input interface includes a frame header input interface, a frame data input interface, and a frame tail input interface. The frame header information, frame data information, and frame tail information are input through the corresponding input interface. The framing logic module 120 receives the frame header information, frame data information, and frame tail information respectively and performs framing, and then stores them in the cache space 150 respectively and adds their respective start marks (frame header identifier) ​​and end marks (frame tail identifier) ​​for distinguishing when reading frames. The framing logic module 120 can execute multiple caches for multiple frames. The content input from the frame header input interface, the frame data input interface, and the frame tail input interface can be customized according to needs to be applied to different functional scenarios. For example, different frame header information, frame data information, and frame tail information input by external functions will form different frame formats, which are completely customized by external applications.

[0049] The check calculation logic module 130 includes a check mode configuration interface; the check calculation logic module 130 is used to receive the check calculation mode configured through the check mode configuration interface, calculate the check value of the current frame according to the check calculation mode when the framing logic module 120 performs framing, and cache the check value, and the check value is used to encapsulate the current frame. In other words, the check calculation logic module 130 can configure the check calculation method externally, and calculate the check value of the current frame at the same time during the framing process of the framing logic, and will calculate until the end of the frame data, and cache the result. Among them, the check calculation mode in the check calculation logic module 130 includes at least one of cumulative sum, cumulative difference, parity check, and bitwise exclusive OR. The check calculation mode used can be configured through the check mode configuration interface.

[0050] The write cache logic module 140 is used to store the frame header information, frame data information, check value, frame tail information and frame identifier into a storage space. The frame identifier includes a frame header identifier and a frame tail identifier, which are used to mark the start and end positions of the current frame.

[0051] The frame including frame header information, frame data information, frame tail information and frame identifier obtained by the framing logic module 120 is stored in the chip storage space through the write cache logic module 140, and the starting and ending positions of the check value obtained by the framing logic module check calculation logic module 130 are stored in the chip storage space.

[0052] In one implementation, to facilitate external modules to read frames, such as Figure 2 As shown, the device further includes a read cache logic module 160; the read cache logic module 160 includes a read interface. The read cache logic module 160 is used to read and output a frame from the cache space 150 according to the frame identifier through the read interface; the frame includes frame header information, frame data information, a check value, frame tail information and a frame identifier.

[0053] Furthermore, the write cache logic module 140 is also used to record the total length of the input frames; the read cache logic module 160 also includes a read ready interface and a read cache threshold configuration interface.

[0054] The read cache logic module 160 is specifically used to receive the configured read cache threshold, and determine to output a read signal through the read ready interface according to the read cache threshold and the total length of the input frame; the read signal is used for the external module to determine to read the frame. The read cache logic module 160 is used to read the frame from the cache space 150 according to the frame identifier through the read interface under the drive of the frame reading task of the external module and output it to the external module. The above-mentioned read cache threshold customized according to the requirements can adapt to special application scenarios such as early reading and preventing the cache from being empty and full.

[0055] Furthermore, the frame identifier includes a frame header identifier and a frame tail identifier; the frame tail information includes an initial frame tail mark, and the frame tail mark is determined according to the initial frame tail mark; the initial frame tail mark includes a 1-bit signal to indicate that the data is valid, and the 1-bit signal data needs to be removed first to obtain the frame tail identifier, and then the frame tail identifier is added again. The read cache logic module 160 outputs a frame tail indication signal when outputting the frame tail to indicate that a complete frame has been output. For example, the frame tail indication signal can be a pulse signal, and this application does not limit this.

[0056] Exemplarily, the storage space is a chip storage space. The read cache logic module 160 is used to determine the relationship between the total length of the input frame in the previous frame step and the read cache threshold, and to set the read ready interface level high when the total length of the input frame is greater than the read cache threshold, otherwise, to keep the read ready interface at a low level. The read cache logic module 160 outputs a pulse signal when outputting the frame end according to the frame end mark and sets the read ready signal to a low level.

[0057] Figure 3 A schematic flow chart of a multiplexing framing method according to an embodiment of the present application is shown. Exemplarily, the multiplexing framing method includes:

[0058] S10, receiving the depth and width of the cache space 150 configured according to the requirement through the depth and width configuration interface, and receiving the verification calculation method configured according to the requirement through the verification method configuration interface.

[0059] In this embodiment, a depth and bit width configuration interface is provided for the external module, so that the external module can customize the depth and bit width of the cache space 150 as required. For example, the cache depth configuration of the use case is at least greater than the full frame of the maximum length, and the cache bit width configuration is equal to the data bit width of each base frame unit. In this embodiment, a check method configuration interface is also provided for the external module, so that the external module can set the check calculation method as required. The check calculation method includes one of cumulative sum, cumulative difference, parity check, and bitwise XOR. Only after the configuration interface is defined can the method of this application be adapted to the specified functional scenario. Exemplarily, the above-mentioned depth and bit width configuration interface and check method configuration interface can be chip ports.

[0060] S20, receiving frame header information, frame data information and frame tail information through input interfaces corresponding to the frame header, frame data and frame tail respectively and adding a frame identifier, and then storing the frame header information, frame data information, frame tail information and frame identifier into the cache space 150 respectively.

[0061] When starting work, the framing logic will receive the frame header information, frame data information, frame tail information, length, and valid signal of each input interface, and effectively cache it according to the content. The above information is completely determined by the application scenario input to determine the frame format it needs to form. For example, the specific content of each part of the frame and its continuous cache length are customized according to the application scenario.

[0062] During the framing process, each input basic frame unit is stored in the cache space 150 through the write cache logic, and the frame header and frame tail identifiers are added to determine the respective start and end positions and record the total length of the input frames.

[0063] S30, framing is performed according to the frame header information, frame data information, frame tail information and frame identifier, and when framing, a check value of the current frame is calculated according to the check calculation method, and the check value is used to assemble into the current frame. While writing the cache, the check logic will calculate the result according to the configured check calculation method and record it and wait for the next base frame unit to continue calculating until the calculation result is cached after the frame data is completed.

[0064] The input of each part of the frame information is a continuous process. The verification logic, framing logic and write cache logic are performed synchronously. While framing, the verification value is also accumulated and calculated until the end of the frame; the write cache logic caches the result of the framing logic before the end of the frame, and caches the verification result of the frame at the end of the frame.

[0065] S40, storing the current frame after framing into the storage space. The current frame after framing includes the frame header identifier, frame header information, frame data information, check value, frame tail information and frame tail identifier. For example, the storage space may be a chip storage space. When reading a frame, it is necessary to first read the frame from the cache space in the chip storage space according to the frame header identifier and the frame tail identifier.

[0066] In one embodiment, the method further includes step S50.

[0067] S50, read a frame from the cache space 150 according to the frame identifier through a read interface and output the frame; the frame includes frame header information, frame data information, check value and frame tail information. Provide a read interface for an external module to read the frame.

[0068] Furthermore, when the frame header information, frame data information, frame tail information and frame identifier are stored in the cache space 150 respectively, the method further includes: recording the total length of the input frame;

[0069] The method further includes receiving a configured read cache threshold, and determining to output a read signal through a read ready interface provided to an external module according to the read cache threshold and the total length of the input frame; the read signal is used for the external module to determine to read the frame; under the drive of the external module, the frame is read from the cache space 150 according to the corresponding storage position through the read interface and output to the external module. The frame tail includes a frame tail mark; when the frame tail is output to the external module, a frame tail indication signal is output.

[0070] Specifically, the relationship between the total length of the input frames recorded in the previous step and the configured read cache threshold is determined. When the total length of the input frames is greater than the read cache threshold, the level signal of the read ready interface is set high, and the read ready interface is kept at a low level at other times. After the external module determines that the signal of the read ready interface is high, the cached frame can be read. When the end of the frame is read out, a pulse signal indicating the end of frame reading is output and the read ready interface signal is set low, and the relationship between the total length of the input frames recorded in the previous two steps and the set read cache threshold is continued to be determined to continue reading frames.

[0071] After completing one frame grouping and caching, multiple frame groups and caching can be supported according to the set cache depth. When it is greater than or equal to one full frame, the read ready interface signal will always be high, and the read interface supports continuous reading of multiple full frames. The specific number of cached full frames is defined according to the application scenario to meet the cache depth.

[0072] It can be understood that the device of this embodiment corresponds to the multiplexing framing method of the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described repeatedly here.

[0073] In order to meet the application requirements of different functions in complex scenes in the project, this application has made a customized reusability design for functions such as framing and caching. For external modules, this application is provided with a depth and bit width configuration interface, a check mode configuration interface, and a read cache threshold, so as to customize the cache depth and bit width, the adopted check calculation method and the read cache threshold according to business requirements. This application is also provided with a frame header input interface, a frame data input interface and a frame tail input interface, so that the external module can customize the framing parameters and content according to the requirements. Then, the framing logic module 120 is used to framing and stored in the cache space 150, the cache management module 110 is used to manage the cache according to the depth and bit width, the check calculation logic module 130 is used to check and store the check results, and the write cache logic module 140 is used to store the frame header, frame data, frame tail, check value and frame identification, etc. This application is also provided with a read ready interface and a read interface for outputting a read ready signal and reading frames. Therefore, this application can effectively solve the problems of high difficulty, long development cycle and high cost in the design and development of framing cache in the existing complex functional application scenarios.

[0074] The present application also provides a terminal device. Exemplarily, the terminal device includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program to enable the terminal device to execute the functions of each module in the above-mentioned multiplexing framing method or the above-mentioned multiplexing framing device.

[0075] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application.

[0076] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.

[0077] The present application also provides a readable storage medium for storing the computer program used in the above-mentioned terminal device.

[0078] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0079] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0080] If the function is implemented in the form of a software function module 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 application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0081] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A multiplexing framing method, characterized in that: include: The depth and width of the cache space configured according to the requirements are received through the depth and width configuration interface, and the verification calculation method configured according to the requirements is received through the verification method configuration interface; Receive frame header information, frame data information and frame tail information respectively through input interfaces corresponding to the frame header, frame data and frame tail, add a frame identifier, and then store the frame header information, frame data information, frame tail information and frame identifier in the cache space respectively; Frame assembly is performed according to the frame header information, frame data information, frame tail information and frame identifier, and when framing, a check value of the current frame is calculated according to the check calculation method, and the check value is used to assemble into the current frame; The current frame after framing is stored in the storage space; When the frame header information, frame data information, frame tail information and frame identifier are stored in the cache space respectively, the method further includes: Record the total length of the input frames; The method further comprises: receiving a configured read cache threshold, and determining to output a read signal through a read ready interface according to the read cache threshold and the total length of the input frame; the read signal is used for an external module to determine to read a frame; Under the drive of the external module, a frame is read from the cache space through a read interface according to the frame identifier and output to the external module.

2. The multiplexing framing method according to claim 1, characterized in that: The method also includes reading a frame from the cache space according to the frame identifier through the read interface and outputting the frame; the frame includes frame header information, frame data information, a check value, frame tail information and a frame identifier.

3. The multiplexing framing method according to claim 1, characterized in that: The frame identifier includes a frame head identifier and a frame tail identifier; the frame tail information includes an initial frame tail mark, and the frame tail identifier is determined according to the initial frame tail mark; when the frame tail is output to the external module, it includes outputting a frame tail indication signal.

4. A multiplexing framing device, characterized in that: The device comprises: a framing logic module, a check calculation logic module, a write cache logic module and a cache management module; the framing logic module is provided with an input interface; The cache management module includes a depth and bit width configuration interface; the cache management module is used to receive the configured depth and bit width through the depth and bit width configuration interface, and configure the size of the cache space and the bit width of each frame according to the depth and bit width; The framing logic module is used to receive frame header information, frame data information and frame tail information through input interfaces corresponding to the frame header, frame data and frame tail, respectively, and add a frame identifier, and then store the frame header information, frame data information, frame tail information and frame identifier into the cache space respectively; The check calculation logic module includes a check mode configuration interface; the check calculation logic module is used to receive the check calculation mode configured through the check mode configuration interface, and calculate the check value of the current frame according to the check calculation mode when the framing logic module performs framing, and the check value is used to be assembled into the current frame; The write cache logic module is used to store the current frame after framing into the storage space; the current frame after framing includes the frame header information, frame data information, frame tail information, check value and frame identifier; The device also includes a read cache logic module; the read cache logic module includes a read interface; the write cache logic module is also used to record the total length of the input frame; the read cache logic module also includes a read ready interface and a read cache threshold configuration interface; The read cache logic module is specifically used to receive the configured read cache threshold, and determine to output a read signal through the read ready interface according to the read cache threshold and the total length of the input frame; the read signal is used for the external module to determine to read the frame; The read cache logic module is used to read frames from the cache space through the read interface according to the frame identifier under the drive of the frame read task of the external module and output the frames to the external module.

5. The multiplexing frame device according to claim 4, characterized in that: The read cache logic module is used to read and output a frame from the cache space according to the frame identifier through a read interface; the frame includes frame header information, frame data information, a check value, frame tail information and a frame identifier.

6. The multiplexing frame device according to claim 4, characterized in that: The frame identifier includes a frame header identifier and a frame tail identifier; the frame tail information includes an initial frame tail mark, and the frame tail identifier is determined according to the initial frame tail mark; the read cache logic module outputs a frame tail indication signal when outputting the frame tail.

7. The multiplexing frame assembly device according to any one of claims 4 to 6, characterized in that: The check calculation method in the check calculation logic module includes at least one of cumulative sum, cumulative difference, parity check, and bitwise exclusive OR.

8. A terminal device, characterized in that: The terminal device comprises a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the multiplexing framing method according to any one of claims 1 to 3.