Data conversion methods, apparatus and computer-readable storage media
By using parameterized data conversion methods and devices, the problems of low debugging efficiency and data transmission errors caused by changes in the number of channels in FPGA display driver systems are solved, and flexible connection of input and output channel numbers and continuous data output are realized.
Patent Information
- Application Number
- CN202280000587.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-28
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2042-03-28
AI Technical Summary
In existing FPGA display driver systems, changes in the number of channels require modifications to the logic code and resynthesis, resulting in low debugging efficiency and data transmission errors.
A parameterized data conversion method and device are adopted. The corresponding memory is selected through the channel number control circuit, and the read signal is controlled to achieve flexible connection of input and output channel numbers, avoiding code modification and comprehensive implementation.
It improves debugging efficiency, ensures continuous data output, reduces the risk of data transmission errors, and simplifies backend module design.
Smart Images

Figure CN117136356B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to, but is not limited to, the field of display driver technology, and in particular to a data conversion method, apparatus, and computer-readable storage medium. Background Technology
[0002] A Field Programmable Gate Array (FPGA) is a programmable device that offers great flexibility and is one of the two conventional solutions for display drivers (the other being an Application Specific Integrated Circuit (ASIC)).
[0003] When using an FPGA as the driving and control system for a display screen, an exemplary system architecture diagram is shown below. Figure 1 As shown in the diagram. The display interface circuit, transfer circuit, mapping circuit, P2P (peer-to-peer) protocol circuit (including protocol and physical layers), and GOA (Gate Driver on Array) control circuit can all be implemented using an FPGA. The interface circuit receives display data from the front end (such as a player). Common interface types include DisplayPort (DP) and High Definition Multimedia Interface (HDMI). The mapping circuit arranges the front end data according to specific rules, and its relationship with the pixel architecture of the display panel and the P2P protocol is significant. The transfer circuit ensures correct connection between the interface circuit and the mapping circuit. Since the number of output channels of the interface circuit and the number of input channels of the mapping circuit are not always equal, the main function of the transfer circuit is to convert the number of channels. For example, if the interface circuit outputs 2 channels while the mapping circuit inputs 8 channels, the transfer circuit needs to perform a "2 to 8" channel conversion. Summary of the Invention
[0004] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.
[0005] This disclosure provides a data conversion method applied to a data conversion device, the data conversion device including at least one first-level memory, at least one second-level memory, and at least one third-level memory, the first-level memory, the second-level memory, and the third-level memory being connected sequentially, the method including:
[0006] Receive a first input, the first input including the number of input channels and / or the number of output channels;
[0007] Select the corresponding second-level memory according to the number of input channels and / or output channels, and control the first read signal and the second read signal according to the number of input channels and / or output channels;
[0008] The data of the input channel is stored in at least one primary memory.
[0009] When the first read signal is enabled, the data in the first-level memory is read and written to the corresponding second-level memory;
[0010] When the second read signal is enabled, the corresponding data in the second-level memory is read and written to the third-level memory.
[0011] In some exemplary embodiments, the number of first-level memories is the same as the maximum number of input channels, and each first-level memory is connected to one of the input channels in a one-to-one correspondence.
[0012] In some exemplary embodiments, the number of the third-level memory is the same as the maximum number of output channels, and each of the third-level memory is connected to one output channel in a one-to-one correspondence.
[0013] In some exemplary embodiments, the number of second-level memories is set according to the number of categories of input channels, and each second-level memory is connected to a first-level memory corresponding to a category of input channels;
[0014] The step of selecting the corresponding second-level memory based on the number of input channels and / or the number of output channels includes:
[0015] Select one corresponding second-level memory based on the number of input channels, and select multiple corresponding third-level memories based on the preset number of output channels.
[0016] In some exemplary embodiments, the number of second-level memories is set according to the number of categories of output channels, and each second-level memory is connected to a third-level memory corresponding to a category of output channels;
[0017] The step of selecting the corresponding second-level memory based on the number of input channels and / or the number of output channels includes:
[0018] Select one or more third-level memories and one second-level memory according to the number of output channels.
[0019] In some exemplary embodiments, the input bit width of each second-level memory is the same as the total output bit width of one or more first-level memories connected to the second-level memory, and the output bit width of each second-level memory is the same as the total output bit width of one or more third-level memories connected to the second-level memory.
[0020] In some exemplary embodiments, the second-level memory includes a first sub-second-level memory and a second sub-second-level memory connected in sequence. The number of the first sub-second-level memories is set according to the number of categories of the number of input channels, and each first sub-second-level memory is connected to a first-level memory corresponding to a category of the number of input channels. The number of the second sub-second-level memories is set according to the number of categories of the number of output channels.
[0021] In some exemplary embodiments, the input bit width of each first sub-secondary memory is the same as the total output bit width of one or more first-level memories connected to the first sub-secondary memory, the output bit width of each first sub-secondary memory is the same as the total output channel bit width corresponding to a preset minimum number of output channels, the input bit width of each second sub-secondary memory is the same as the total output channel bit width corresponding to a preset minimum number of output channels, and the output bit width of each second sub-secondary memory is the same as the total input bit width of one or more third-level memories connected to the second sub-secondary memory.
[0022] In some exemplary embodiments, the second read signal includes a first sub-second read signal and a second sub-second read signal;
[0023] The step of selecting the corresponding second-level memory based on the number of input channels and / or the number of output channels includes:
[0024] The first sub-secondary memory is selected according to the number of input channels, and the second sub-secondary memory and the third-level memory are selected according to the number of output channels.
[0025] The step of reading data from the first level memory and writing it to the corresponding second level memory when the first read signal is enabled, and reading data from the corresponding second level memory and writing it to the third level memory when the second read signal is enabled, includes: reading data from the first level memory and writing it to the corresponding first sub-second level memory when the first read signal is enabled; reading data from the corresponding first sub-second level memory and writing it to the corresponding second sub-second level memory when the first sub-second read signal is enabled; and reading data from the second sub-second level memory and writing it to the corresponding third level memory when the second sub-second read signal is enabled.
[0026] In some exemplary embodiments, the second-level memory includes one, and the input bit width of the second-level memory is equal to the sum of the bit widths of all the input channels, and the output bit width of the second-level memory is equal to the sum of the bit widths of all the output channels;
[0027] When the second read signal is enabled, reading the data from the corresponding second-level memory and writing it to the corresponding third-level memory includes:
[0028] When the second read signal is enabled, data is read from the second-level memory;
[0029] Select valid data from the read data based on the number of input channels;
[0030] The selected valid data is written into the corresponding third-level memory according to the number of output channels.
[0031] In some exemplary embodiments, the method further includes;
[0032] The third read signal is controlled according to the preset timing sequence;
[0033] When the third read signal is enabled, the data in the third-level memory is read and distributed to the corresponding output channel.
[0034] This disclosure also provides a data conversion apparatus, including: a channel number control circuit, a data continuity circuit, a data reconstruction circuit, and a data distribution circuit, wherein:
[0035] The channel number control circuit is used to receive a first input, the first input including the number of input channels and / or the number of output channels, select the corresponding first-level memory and third-level memory according to the number of input channels and / or the number of output channels, and control the first read signal and the second write signal according to the number of input channels and / or the number of output channels.
[0036] The data continuity circuit includes a plurality of first-level memories for storing data from the input channel through at least one first-level memory.
[0037] The data distribution circuit includes multiple third-level memories;
[0038] The data reconstruction circuit includes at least one second-level memory for receiving a first read signal and a second write signal. When the first read signal is enabled, data in the first-level memory is read and written to the corresponding second-level memory; when the second write signal is enabled, data in the corresponding second-level memory is read and written to the third-level memory.
[0039] This disclosure also provides a data conversion apparatus, including a memory; and a processor connected to the memory, the memory being used to store instructions, the memory further including a first-level memory, a second-level memory, and a third-level memory, the processor being configured to perform steps of the data conversion method as described in any of the preceding claims based on the instructions stored in the memory.
[0040] This disclosure also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the data conversion method as described in any of the preceding claims.
[0041] After reading and understanding the accompanying diagrams and detailed descriptions, other aspects can be understood. Attached Figure Description
[0042] The accompanying drawings are provided to further illustrate the technical solutions of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the technical solutions of this disclosure and do not constitute a limitation on the technical solutions of this disclosure. The shapes and sizes of the components in the drawings do not reflect actual proportions and are only intended to illustrate the content of this disclosure.
[0043] Figure 1 This is a schematic diagram of an exemplary architecture for a display driver control system using an FPGA.
[0044] Figure 2 This is a schematic diagram of an exemplary implementation of a conversion circuit;
[0045] Figure 3 A schematic diagram of the structure of a data conversion apparatus provided for an exemplary embodiment of this disclosure;
[0046] Figures 4 to 7 Schematic diagrams of four other data conversion devices provided for exemplary embodiments of this disclosure;
[0047] Figure 8 A flowchart illustrating a data conversion method provided for an exemplary embodiment of this disclosure;
[0048] Figure 9 A schematic diagram of the structure of another data conversion apparatus provided as an exemplary embodiment of the present disclosure. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be arbitrarily combined with each other.
[0050] Unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure shall have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" indicate that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, but do not exclude other elements or objects.
[0051] Figure 2 This is a schematic diagram of an exemplary implementation of a conversion circuit, such as... Figure 2 As shown, the conversion circuit can include a data storage circuit, a data reconstruction circuit, and a data distribution circuit. The data storage circuit buffers the data output from the interface circuit, the data reconstruction circuit packages several data items, and the data distribution circuit distributes the packaged data to several output channels. For example, if the interface circuit has M output channels, each with a bit / lane and a transmission frequency of fa; and the mapping circuit has N input channels, each with a bit / lane and a transmission frequency of fb. To maintain the same total amount of input and output data, the conversion circuit must satisfy the relationship: M × a × fa × C = N × b × fb, where C can be called the clock cycles, representing the frequency correspondence that the input and output should satisfy at their respective transmission frequencies—the total amount of data input C times can satisfy exactly one output. In short, the function of the conversion circuit is—to reconstruct the data input from the M front-end channels without data loss, and then transmit it out through N channels.
[0052] exist Figure 2 In the illustrated scheme, M and N must be determined in advance, and the conversion circuit, once designed, can only achieve one conversion relationship (e.g., "2 to 8"). However, in practical applications, M and N often need to be changed due to changes in requirements (e.g., "4 to 8"). In this case, the logic code must be modified and re-synthesized to achieve the above purpose, which is equivalent to redesigning a conversion circuit. The whole process is time-consuming and affects efficiency.
[0053] This disclosure proposes a parameterized data conversion method and apparatus. When the number of channels in the interface circuit or mapping circuit changes, only the control parameters need to be modified to correspond, eliminating the complex process of modifying code and synthesizing implementation, thereby improving debugging efficiency.
[0054] like Figure 3 As shown, this embodiment of the disclosure provides a data conversion device, including: a channel number control circuit 301, a data continuation circuit 302, a data reconstruction circuit 303, and a data distribution circuit 304, wherein:
[0055] The channel number control circuit 301 is configured to receive a first input, the first input including the number of input channels and / or the number of output channels, select the corresponding second-level memory according to the number of input channels and / or the number of output channels, and control the first read signal and the second read signal;
[0056] The data continuation circuit 302 includes a plurality of first-level memories and is configured to store data of the input channel through at least one first-level memory.
[0057] The data distribution circuit 304 includes a plurality of third-level memories and is configured to distribute data from at least one third-level memory to an output channel.
[0058] The data reconstruction circuit 303 includes at least one second-level memory and is configured to receive a first read signal and a second read signal. When the first read signal is enabled, it reads data from the first-level memory and writes it to the corresponding second-level memory; when the second read signal is enabled, it reads data from the corresponding second-level memory and writes it to the third-level memory.
[0059] The data conversion device provided in this disclosure selects the corresponding second-level memory according to the number of input channels and / or output channels, and controls the first and second read signals. When the number of input channels and / or output channels changes, only the parameters need to be modified to achieve correct connection between the two, without the need for the complex process of modifying code and comprehensive implementation, thereby improving debugging efficiency. In addition, when the data input from the input channels is discontinuous, the data conversion device in this disclosure can make the output data continuous, thereby reducing the risk of errors in the data transmission process and simplifying the design of other back-end modules.
[0060] The data conversion device of this disclosure can be implemented by a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC), or by other programmable devices, and this disclosure does not limit it.
[0061] The data conversion device of this disclosure can be applied to the conversion circuit in the display driver, or to any other scenario that requires channel conversion, and this disclosure does not limit it.
[0062] The data conversion apparatus of this disclosure can be applied to situations where the number of input channels is variable and the number of output channels is fixed, or to situations where the number of input channels is fixed and the number of output channels is variable, or to situations where the number of input channels is variable and the number of output channels is variable. This disclosure does not limit the application of this method.
[0063] In some exemplary implementations, the number of input channels and / or output channels input by the user can be implemented through virtual I / O, thus enabling online modification of the number of input channels and / or output channels.
[0064] Virtual I / O is an online debugging method supported by FPGA chips. Its implementation can be divided into two steps: First, when designing the FPGA code, the FPGA's built-in virtual I / O IP core needs to be called, and the virtual I / O ports need to be associated with the controlled signals in the code. Second, after the code is designed, it is downloaded to the FPGA chip through PC application software. After successful download, the designer can assign values to the virtual I / O ports through the software interface.
[0065] like Figures 4 to 7 As shown, Buffer1 represents the first-level memory, Buffer2 represents the second-level memory, and Buffer3 represents the third-level memory. Although Figures 4 to 7 The memory in this embodiment is represented by a buffer. However, since the function of the memory (which can be a first-level memory, a second-level memory, or a third-level memory) in this disclosure is data storage, this disclosure does not limit the types of the first-level memory, the second-level memory, and the third-level memory. For example, the first-level memory, the second-level memory, and the third-level memory can be buffer memory or any other type of memory. This disclosure also does not limit the implementation method of the first-level memory, the second-level memory, and the third-level memory. For example, the first-level memory, the second-level memory, and the third-level memory can use on-chip resources of the FPGA (such as block memory or distributed memory units) or off-chip resources (such as DDR (Double Data Rate SDRAM)).
[0066] In some exemplary implementations, such as Figures 4 to 7 As shown, the number of first-level memory Buffer1 is the same as the maximum number of input channels, and each first-level memory Buffer1 is connected to one input channel in a one-to-one correspondence.
[0067] like Figures 4 to 7As shown, for example, considering that the number of channels of an existing single DP / HDMI interface is 4, the maximum number of input channels can be 4, and the number of first-level memory Buffer1 can be 4; however, this disclosure does not limit this.
[0068] In some exemplary embodiments, the input bit width (i.e., write port bit width) and output bit width (i.e., read port bit width) of the first-level memory Buffer1 are the same, both equal to the bit width of the input channel connected to the first-level memory Buffer1.
[0069] like Figures 4 to 7 As shown, for example, the input channel width can be 24 bits per channel (bit / lane), and the input and output widths of the first-level memory Buffer1 can both be 24 bits. However, this disclosure is not limited in this respect, and the input channel width can be set to other widths as needed, as can the input and output widths of the first-level memory Buffer1.
[0070] Furthermore, this disclosure does not limit the data format. For example, the data format can be binary, decimal, hexadecimal, etc.
[0071] In some exemplary implementations, such as Figures 4 to 7 As shown, when the first write signal wr_en1 is valid, the data continuation circuit 302 can store the data of the input channel through at least one first-stage memory buffer 1. The first write signal wr_en1 can be generated by the preceding stage device of the data conversion device. For example, the first write signal wr_en1 can be determined by the data enable (DE) signal of the DP interface or the HDMI interface.
[0072] In some exemplary implementations, such as Figures 4 to 7 As shown, the number of third-level memory Buffer3 is the same as the maximum number of output channels, and each third-level memory Buffer3 is connected to one output channel in a one-to-one correspondence.
[0073] like Figures 4 to 7 As shown, for example, the maximum number of output channels can be 8 or 16; however, this disclosure is not limited to this, for example, the maximum number of output channels can be any natural number greater than or equal to 1.
[0074] In some exemplary embodiments, the input bit width and output bit width of the third-level memory Buffer3 are the same, both equal to the bit width of the output channel to which the third-level memory Buffer3 is connected.
[0075] like Figures 4 to 7As shown, for example, the output channel width can be 24 bits per channel (bit / lane), and the input and output widths of the third-level memory Buffer3 can both be 24 bits. However, this disclosure is not limited in this respect, and the output channel width can be set to other widths as needed, as can the input and output widths of the third-level memory Buffer3.
[0076] In this embodiment, in addition to distributing data according to the specified number of output channels, the data distribution circuit 304 can also output data according to a specified timing. For example, the specified timing can be Porch timing, which simplifies the design of the back-end mapping circuit.
[0077] When the display interface transmits data, there is a certain positional relationship between the valid data and the start signal. This relationship is usually characterized by a set of Porch parameters. For example, Porch parameters include total horizontal lines (HTotal), valid horizontal lines (HActive), horizontal synchronization (HSYNC), horizontal back edge clamp (HBack Porch, HBP), horizontal leading edge clamp (HFront Porch, HFP), horizontal blanking (HBlanking), valid video end (EAV), valid video start (SAV), total vertical lines (VTotal), valid vertical lines (VActive), vertical leading edge clamp (VFront Porch, VFP), vertical blanking interval (VBI), vertical back edge clamp (VBack Porch, VBP), and vertical blanking (VBlanking), etc. Wherein, VBP represents the number of invalid rows after the vertical sync signal at the beginning of a frame, VFP represents the number of invalid rows before the vertical sync signal at the end of a frame, HBP represents the number of clock signals between the start of the horizontal sync signal and the start of valid data in a row, and HFP represents the number of clock signals between the end of valid data in a row and the start of the next horizontal sync signal.
[0078] An exemplary implementation of outputting data at a specified timing is as follows: First, the reassembled data is buffered in a third-level memory Buffer3 (exemplarily, the FIFO IP core built into the FPGA can be used). Then, a third read signal rd_en3 of a specified form is designed. When the third read signal rd_en3 is enabled, the data in the third-level memory Buffer3 is read. That is, the timing of the output data is controlled by controlling whether the third read signal rd_en3 is enabled or not through the data distribution circuit 304.
[0079] In this embodiment of the disclosure, the channel number control circuit 301 controls the writing and reading of the second-level memory Buffer2, that is, it controls the first read signal rd_en1 and the second read signal rd_en2. Assuming that both the first read signal rd_en1 and the second read signal rd_en2 are active high, when the first read signal rd_en1 is enabled (i.e., high level), the data of the first-level memory Buffer1 is read and written to the corresponding second-level memory Buffer2; when the second read signal rd_en2 is enabled (i.e., high level), the data of the corresponding second-level memory Buffer2 is read and written to the third-level memory Buffer3.
[0080] In this embodiment, by setting the first-level memory Buffer1 and the first read signal rd_en1, the data continuation circuit 302 can not only store data but also continuate the discontinuous data input from the interface circuit. In some cases, the data output by the interface circuit may be discontinuous, and therefore must be continuated before it can be used by the data reconstruction circuit 303.
[0081] For example, one implementation of continuous processing is as follows: First, the intermittently input data is written to the first-level memory Buffer1, and only valid data is included during the writing process. This process can be called "data buffering". Second, the buffered data is read out continuously by designing the first read signal rd_en1.
[0082] In this embodiment of the disclosure, the channel number control circuit 301 can be implemented by combining sequential logic.
[0083] In some exemplary embodiments, the channel number control circuit 301 may include an input data counter, an output data counter, and a signal generator. The input counter is configured to cyclically count the number of data written to the second-level memory Buffer 2 within a preset time period (e.g., within one line time). The output counter is configured to cyclically count the number of data output from the second-level memory Buffer 2 within a preset time period (e.g., within one line time). The signal generator is configured to set the first read signal rd_en1 low (i.e., stop reading data from the first-level memory Buffer 1) when the difference between the input data count and the output data count is higher than a first maximum difference threshold; set the second read signal rd_en2 low when the difference between the input data count and the output data count is lower than a second minimum difference threshold; and set the first read signal rd_en1 high and the second read signal rd_en2 high when the difference between the input data count and the output data count is lower than a preset maximum difference threshold and higher than a preset minimum difference threshold. In this embodiment, the first highest difference threshold and the second lowest difference threshold can be designed based on the number of input channels and the number of output channels, the bit width of the input channels, and the bit width of the output channels.
[0084] In other exemplary embodiments, the channel number control circuit 301 can generate a first read signal rd_en1 and a second read signal rd_en2 based on the empty / full flag signal of the second-level memory Buffer 2. When the empty / full flag signal of the second-level memory Buffer 2 is in a full state, the first read signal rd_en1 is set low; when the empty / full flag signal of the second-level memory Buffer 2 is in an empty state, the second read signal rd_en2 is set low; when the empty / full flag signal of the second-level memory Buffer 2 is neither full nor empty, the first read signal rd_en1 and the second read signal rd_en2 are both set high. In this embodiment, Buffer 2 can be implemented using the FIFO IP core built into the FPGA. The FIFO IP core built into the FPGA usually has an empty / full flag signal (Empty, Full), which can be used as the basis for setting the read / write enable signal low.
[0085] In some exemplary implementations, such as Figure 4 As shown, the data reconstruction circuit 303 may further include a first multiplexer MUX1, the number of second-level memory Buffer2 is set according to the number of input channel categories, and each second-level memory Buffer2 is connected to a first-level memory Buffer1 corresponding to a certain type of input channel number, and the third-level memory Buffer3 is connected to the second-level memory Buffer2 through the first multiplexer MUX1.
[0086] For example, such as Figure 4 As shown, the number of input channels can be 1, 2 or 4, that is, there are 3 types of input channels. Therefore, there are 3 second-level memory buffers. The first second-level memory buffer is connected to 1 first-level memory buffer, the second second-level memory buffer is connected to 2 first-level memory buffers, and the third second-level memory buffer is connected to 4 first-level memory buffers.
[0087] In some exemplary embodiments, the first multiplexer MUX1 selects a corresponding second-level memory buffer 2 according to the number of input channels, and selects one or more corresponding third-level memory buffers 3 according to the preset number of output channels.
[0088] For example, such as Figure 4 As shown, when the number of input channels is 1, the first multiplexer MUX1 selects one corresponding second-level memory buffer2 as the second-level memory buffer2 connected to one first-level memory buffer1 (i.e., the second-level memory buffer2 corresponding to path 1); when the number of input channels is 2, the first multiplexer MUX1 selects one corresponding second-level memory buffer2 as the second-level memory buffer2 connected to two first-level memory buffers1 (i.e., the second-level memory buffer2 corresponding to path 2); when the number of input channels is 4, the first multiplexer MUX1 selects one corresponding second-level memory buffer2 as the second-level memory buffer2 connected to four first-level memory buffers1 (i.e., the second-level memory buffer2 corresponding to path 3). Assuming the preset number of output channels is 8 (this disclosure does not limit this, and it can also be other values), then the first multiplexer MUX1 selects all the corresponding third-level memory buffers3.
[0089] In some exemplary embodiments, the input bit width of each second-level memory Buffer2 is the same as the total output bit width of one or more first-level memory Buffers1 connected to the second-level memory Buffer2, and the output bit width of each second-level memory Buffer2 is the same as the total output bit width of one or more third-level memory Buffers3 connected to the second-level memory Buffer2.
[0090] For example, such as Figure 4As shown, the second-level memory Buffer2 corresponding to path 1 is connected to one first-level memory Buffer1 with an input bit width of 24 bits, and is connected to eight third-level memory Buffer3s with an output bit width of 192 bits. The second-level memory Buffer2 corresponding to path 2 is connected to two first-level memory Buffer1s with an input bit width of 48 bits, and is connected to eight third-level memory Buffer3s with an output bit width of 192 bits. The second-level memory Buffer2 corresponding to path 3 is connected to four first-level memory Buffer1s with an input bit width of 96 bits, and is connected to eight third-level memory Buffer3s with an output bit width of 192 bits.
[0091] exist Figure 4 In the data conversion device shown, the number of input channels can be set by parameters, while the number of output channels is fixed. Figure 4 The solution allows for parameterized input channel settings (1 / 2 / 4 channels) with a fixed output of 8 channels. During the data reconstruction stage, a multiplexer selects different paths (where path 1 / path 2 / path 3 uses 1 / 2 / 4 channels as data sources, respectively). The multiplexer is controlled by an externally input signal indicating the number of input channels. Figure 4 The maximum number of input and output channels is 4 and 8 channels respectively. In actual use, the number of channels can be designed to be other than that required.
[0092] In some exemplary implementations, such as Figure 5 As shown, the data reconstruction circuit 303 may also include a second multiplexer MUX2, the number of second-level memory buffers 2 is set according to the number of categories of output channels, and each second-level memory buffer 2 is connected to a third-level memory buffer 3 corresponding to a category of output channels through the second multiplexer MUX2.
[0093] For example, such as Figure 5 As shown, the number of output channels can be 4, 8, 12, or 16, meaning there are 4 types of output channels. Therefore, there are 4 second-level memory buffers. The first second-level memory buffer is connected to 4 third-level memory buffers, the second second-level memory buffer is connected to 8 third-level memory buffers, the third second-level memory buffer is connected to 12 third-level memory buffers, and the fourth second-level memory buffer is connected to 16 third-level memory buffers.
[0094] In some exemplary embodiments, the second multiplexer MUX2 selects and connects to a plurality of corresponding third-level memory Buffer3 and a second-level memory Buffer2 according to the number of output channels.
[0095] For example, such as Figure 5 As shown, when the number of output channels is 4, the second multiplexer MUX2 selects the corresponding multiple third-level memory Buffer3 and one second-level memory Buffer2 to form four third-level memory Buffer3s and corresponding second-level memory Buffer2s connected to these four third-level memory Buffer3s (i.e., the second-level memory Buffer2 corresponding to path 1); when the number of output channels is 8, the second multiplexer MUX2 selects the corresponding multiple third-level memory Buffer3s and one second-level memory Buffer2 to form eight third-level memory Buffer3s and corresponding second-level memory Buffer2s connected to these eight third-level memory Buffer3s (i.e., the second-level memory Buffer2 corresponding to path 2); when... When the number of output channels is 12, the second multiplexer MUX2 selects the corresponding multiple third-level memory Buffer3 and one second-level memory Buffer2 to form twelve third-level memory Buffer3s and corresponding second-level memory Buffer2s connected to these twelve third-level memory Buffer3s (i.e., the second-level memory Buffer2 corresponding to path 3). When the number of output channels is 16, the second multiplexer MUX2 selects the corresponding multiple third-level memory Buffer3 and one second-level memory Buffer2 to form sixteen third-level memory Buffer3s and corresponding second-level memory Buffer2s connected to these sixteen third-level memory Buffer3s (i.e., the second-level memory Buffer2 corresponding to path 4). Assuming the preset number of input channels is 4 (this disclosure does not limit this, and it can also be other values), each second-level memory Buffer2 is connected to all first-level memory Buffer1s.
[0096] In some exemplary embodiments, the input bit width of each second-level memory Buffer2 is the same as the total output bit width of one or more first-level memory Buffers1 connected to the second-level memory Buffer2, and the output bit width of each second-level memory Buffer2 is the same as the total output bit width of one or more third-level memory Buffers3 connected to the second-level memory Buffer2.
[0097] For example, such as Figure 5As shown, the second-level memory Buffer2 corresponding to path 1 connects to 4 first-level memory Buffers 1 with an input bit width of 96 bits, and connects to 4 third-level memory Buffers 3 with an output bit width of 96 bits. The second-level memory Buffer2 corresponding to path 2 connects to 4 first-level memory Buffers 1 with an input bit width of 96 bits, and connects to 8 third-level memory Buffers 3 with an output bit width of 192 bits. The second-level memory Buffer2 corresponding to path 3 connects to 4 first-level memory Buffers 1 with an input bit width of 96 bits, and connects to 12 third-level memory Buffers 3 with an output bit width of 288 bits. The second-level memory Buffer2 corresponding to path 4 connects to 4 first-level memory Buffers 1 with an input bit width of 96 bits, and connects to 16 third-level memory Buffers 3 with an output bit width of 384 bits.
[0098] exist Figure 5 In the data conversion device shown, the number of input channels is fixed, while the number of output channels can be set by parameters. Figure 5 The solution allows for a fixed 4 input channels and parameterizable output channels (4 / 8 / 12 / 16 channels). During the data reconstruction stage, a multiplexer selects different paths (path 1 / path 2 / path 3 / path 4 correspond to 4 / 8 / 12 / 16 channels respectively). The multiplexer is controlled by an externally input signal controlling the number of output channels. Figure 5 The maximum number of input and output channels is 4 and 16 channels respectively. In actual use, the number of channels can be designed to be other than that required.
[0099] In some exemplary implementations, such as Figure 6As shown, the data reconstruction circuit 303 includes a third multiplexer MUX3 and a fourth multiplexer MUX4. The second-level memory Buffer 2 includes a first sub-second-level memory Buffer 21 and a second sub-second-level memory Buffer 22. The number of first sub-second-level memory Buffers 21 is set according to the number of input channel categories, and each first sub-second-level memory Buffer 21 is connected to a first-level memory Buffer 1 corresponding to a certain type of input channel. The number of second sub-second-level memory Buffers 22 is set according to the number of output channel categories. The second sub-second-level memory Buffer 22 is connected to the first sub-second-level memory Buffer 21 through the third multiplexer MUX3. The third-level memory Buffer 3 is connected to the second sub-second-level memory Buffer 22 through the fourth multiplexer MUX4. The third multiplexer MUX3 selects the first sub-second-level memory Buffer 21 connected to the second sub-second-level memory Buffer 22 according to the number of input channels. The fourth multiplexer MUX4 selects the second sub-second-level memory Buffer 22 connected to the third-level memory Buffer 3 according to the number of output channels.
[0100] For example, such as Figure 6 As shown, when the number of input channels is 1, the first sub-secondary memory buffer 21 selected by the third multiplexer MUX3 is the first sub-secondary memory buffer 21 connected to one first-level memory buffer 1 (i.e., the first sub-secondary memory buffer 21 corresponding to input path 1); when the number of input channels is 2, the first sub-secondary memory buffer 21 selected by the third multiplexer MUX3 is the first sub-secondary memory buffer 21 connected to two first-level memory buffers 1 (i.e., the first sub-secondary memory buffer 21 corresponding to input path 2); when the number of input channels is 4, the first sub-secondary memory buffer 21 selected by the third multiplexer MUX3 is the first sub-secondary memory buffer 21 connected to four first-level memory buffers 1 (i.e., the first sub-secondary memory buffer 21 corresponding to input path 3).
[0101] like Figure 6As shown, when the number of output channels is 4, the second sub-second-level memory buffer 22 selected by the fourth multiplexer MUX4 is the second sub-second-level memory buffer 22 connected to four third-level memory buffers 3 (i.e., the second sub-second-level memory buffer 22 corresponding to output path 1); when the number of output channels is 8, the second sub-second-level memory buffer 22 selected by the fourth multiplexer MUX4 is the second sub-second-level memory buffer 22 connected to eight third-level memory buffers 3 (i.e., the second sub-second-level memory buffer 22 corresponding to output path 2); when the number of output channels is 12, the second sub-second-level memory buffer 22 selected by the fourth multiplexer MUX4 is the second sub-second-level memory buffer 22 connected to twelve third-level memory buffers 3 (i.e., the second sub-second-level memory buffer 22 corresponding to output path 3); when the number of output channels is 16, the second sub-second-level memory buffer 22 selected by the fourth multiplexer MUX4 is the second sub-second-level memory buffer 22 connected to sixteen third-level memory buffers 3 (i.e., the second sub-second-level memory buffer 22 corresponding to output path 4).
[0102] In some exemplary implementations, such as Figure 6 As shown, the channel number control circuit 301 includes a first control circuit and a second control circuit. The first control circuit is configured to control the first read signal rd_en1 and the first sub-second read signal rd_en21 according to the number of input channels, and the second control circuit is configured to control the second sub-second read signal rd_en22 according to the number of output channels.
[0103] In this embodiment, the first control circuit controls the writing and reading of the first sub-secondary memory Buffer 21, that is, it controls the first read signal rd_en1 and the first sub-secondary read signal rd_en21. Assuming that both the first read signal rd_en1 and the first sub-secondary read signal rd_en21 are active high, when the first read signal rd_en1 is enabled (i.e., high level), the data of the first-level memory Buffer 1 is read and written to the corresponding first sub-secondary memory Buffer 21; when the first sub-secondary read signal rd_en21 is enabled (i.e., high level), the data of the corresponding first sub-secondary memory Buffer 21 is read and written to the corresponding second sub-secondary memory Buffer 22.
[0104] In this embodiment of the disclosure, the function of the second control circuit is to control the reading of the second sub-second-level memory Buffer22, that is, to control the second sub-second read signal rd_en22. Assuming that the second sub-second read signal rd_en22 is active high, when the second sub-second read signal rd_en22 is enabled (i.e., high level), the data of the second sub-second-level memory Buffer22 is read and written to the corresponding third-level memory Buffer3.
[0105] In this embodiment, the first control circuit and the second control circuit can be implemented by combining sequential logic. Specific implementation methods can be found in the implementation method of the channel number control circuit 301 described above, and will not be repeated here.
[0106] In some exemplary embodiments, the input bit width of each first sub-secondary level memory buffer 21 is the same as the total output bit width of one or more first-level memory buffers 1 connected to the first sub-secondary level memory buffer 21, the output bit width of each first sub-secondary level memory buffer 21 is the same as the total output channel bit width corresponding to a preset minimum number of output channels, the input bit width of each second sub-secondary level memory buffer 22 is the same as the total output channel bit width corresponding to a preset minimum number of output channels, and the output bit width of each second sub-secondary level memory buffer 22 is the same as the total input bit width of one or more third-level memory buffers 3 connected to the second sub-secondary level memory buffer 22.
[0107] For example, such as Figure 6 As shown, the first sub-secondary level memory Buffer21 corresponding to input path 1 has 1 first-level memory Buffer1 connected to it, with an input bit width of 24 bits, a minimum number of output channels of 4, and an output bit width of 96 bits; the first sub-secondary level memory Buffer21 corresponding to input path 2 has 2 first-level memory Buffer1 connected to it, with an input bit width of 48 bits, a minimum number of output channels of 4, and an output bit width of 96 bits; the first sub-secondary level memory Buffer21 corresponding to input path 3 has 4 first-level memory Buffer1 connected to it, with an input bit width of 96 bits, a minimum number of output channels of 4, and an output bit width of 96 bits.
[0108] like Figure 6As shown, the second sub-level memory Buffer 22 corresponding to output path 1 has a minimum of 4 output channels and an input bit width of 96 bits. It is connected to 4 third-level memory Buffers 3, with an output bit width of 96 bits. The second sub-level memory Buffer 22 corresponding to output path 2 has a minimum of 4 output channels and an input bit width of 96 bits. It is connected to 8 third-level memory Buffers 3, with an output bit width of 192 bits. The second sub-level memory Buffer 22 corresponding to output path 3 has a minimum of 4 output channels and an input bit width of 96 bits. It is connected to 12 third-level memory Buffers 3, with an output bit width of 288 bits. The second sub-level memory Buffer 22 corresponding to output path 4 has a minimum of 4 output channels and an input bit width of 96 bits. It is connected to 16 third-level memory Buffers 3, with an output bit width of 384 bits.
[0109] Figure 6 The scheme shown allows for parameterized setting of input channels (1 / 2 / 4 channels) and output channels (16 / 12 / 8 / 4 channels), controlled by two signals (input channel number control signal and output channel number control signal). Output paths 1, 2, 3, and 4 correspond to 4 channels (Lane 1-4), 8 channels (Lane 1-8), 12 channels (Lane 1-12), and 16 channels (Lane 1-16), respectively. When the number of output channels is less than 16, the output of other invalid channels can be set to 24'h0 (24'h0 represents 24-bit hexadecimal 0). Figure 6 The maximum number of input and output channels is 4 and 16 respectively, but other channel numbers can be designed according to actual needs.
[0110] In some exemplary embodiments, the data reconstruction circuit 303 further includes an input / output selection circuit, the second-level memory includes one, and the input bit width of the second-level memory is equal to the sum of the bit widths of all input channels, and the output bit width of the second-level memory is equal to the sum of the bit widths of all output channels.
[0111] The input / output selection circuit is configured to select valid data in the second-level memory based on the number of input channels and / or the number of output channels, and distribute the selected valid data to the corresponding output channel.
[0112] like Figure 7 As shown, the sum of the bit widths of all input channels is 96 bits, the input bit width of the second-level memory Buffer2 is 96 bits, the sum of the bit widths of all output channels is 384 bits, and the output bit width of the second-level memory Buffer2 is 384 bits.
[0113] In some exemplary embodiments, when the number of input channels is fixed and the number of output channels is variable, the input / output selection circuit can regard all the data in the second-level memory as valid data and distribute the valid data to the corresponding output channel according to the number of output channels; when the number of input channels is variable and the number of output channels is fixed, the input / output selection circuit can select the valid data in the second-level memory according to the number of input channels and distribute the selected valid data to all output channels.
[0114] In some exemplary embodiments, when the number of input channels and the number of output channels are variable, the input / output selection circuit includes an input selection circuit and an output selection circuit, wherein:
[0115] The input selection circuit is configured to select valid data in the second-level memory based on the number of input channels.
[0116] The output selection circuit is configured to distribute selected valid data to the corresponding output channel based on the number of output channels.
[0117] Both the input selection circuit and the output selection circuit in the embodiments of this disclosure can be implemented based on a finite state machine (FSM). The key to an FSM is to clarify what conditions exist and what the output is under those conditions.
[0118] Taking an input selection circuit as an example, the number of input channels can be used as a condition for the input selection circuit's FSM (Functional Mode). For example, the following logic can be designed:
[0119] When the number of input channels is 1, 96 bits of the 384 bits of the FSM output data of the input selection circuit are valid data;
[0120] When the number of input channels is 2, 192 bits of the 384 bits of FSM output data from the input selection circuit are valid data;
[0121] When the number of input channels is 4, all 384 bits of the FSM output data of the input selection circuit are valid data.
[0122] Once it is known which bits in the 384-bit output data of the input selection circuit's FSM are valid, the output selection circuit can also be designed with similar logic using the FSM.
[0123] When the number of output channels = 1, the first 24 bits of the 384 bits of FSM output data from the output selection circuit are valid data;
[0124] When the number of output channels = 2, the first 48 bits of the 384 bits of FSM output data of the output selection circuit are valid data;
[0125] When the number of output channels is 4, the first 96 bits of the 384 bits of FSM output data from the output selection circuit are valid data;
[0126] Similarly, when the number of output channels is 16, all 384 bits of the FSM output data of the output selection circuit are valid data.
[0127] Figures 4 to 6 The data conversion device shown has a relatively intuitive implementation idea, but it uses a lot of storage units and consumes a lot of resources. Figure 7 The data conversion device shown uses combinational sequential logic to implement the input / output selection circuit, resulting in relatively low storage resource consumption. The input / output selection circuit may have several implementation methods, which are not limited in this disclosure.
[0128] In some exemplary embodiments, the user's first input may include, in addition to the number of input channels and / or output channels, at least one of the following: one or more specified input channels, and one or more specified output channels. For example, when the user specifies two input channels and the input channels are Lanes 3 to 4, the user-specified Lanes 3 to 4 are used as input channels. When the user specifies only two input channels but does not specify which input channels to use, the default Lanes 1 to 2 are used as input channels. Similarly, when the user specifies eight output channels and the output channels are Lanes 9 to 16, the user-specified Lanes 9 to 16 are used as output channels. When the user specifies only eight output channels but does not specify which output channels to use, the default Lanes 1 to 8 are used as output channels.
[0129] like Figure 8 As shown in the embodiments of this disclosure, a data conversion method is also provided, including the following steps:
[0130] Step 801: Receive the first input, which includes the number of input channels and / or the number of output channels;
[0131] Step 802: Select the corresponding second-level memory according to the number of input channels and / or output channels, and control the first read signal and the second read signal;
[0132] Step 803: Store the data of the input channel through at least one first-level memory;
[0133] Step 804: When the first read signal is enabled, read the data from the first-level memory and write it to the corresponding second-level memory;
[0134] Step 805: When the second read signal is enabled, read the corresponding data from the second-level memory and write it to the third-level memory.
[0135] The data conversion method of this disclosure selects the corresponding second-level memory according to the number of input channels and / or output channels, and controls the first read signal and the second read signal. When the number of input channels and / or output channels changes, only the parameters need to be modified to achieve correct connection between the two, without the need for the complex process of modifying code and comprehensive implementation, thereby improving debugging efficiency. In addition, when the data input from the input channels is discontinuous, the data conversion method of this disclosure can make the output data continuous, thereby reducing the risk of errors in the data transmission process and simplifying the design of other back-end circuits.
[0136] The data conversion method of this disclosure can be implemented by a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC), or by other programmable devices. This disclosure does not limit the implementation of this method.
[0137] The data conversion method of this disclosure can be used in the conversion circuit in the display driver, or in other scenarios that require channel conversion, and this disclosure does not limit it.
[0138] In some exemplary implementations, the number of input channels and / or output channels input by the user can be implemented through virtual I / O, thus enabling online modification of the number of input channels and / or output channels.
[0139] In some exemplary embodiments, the number of first-level memories is the same as the maximum number of input channels, and each first-level memory is configured to correspond one-to-one with an input channel.
[0140] like Figures 4 to 7 As shown, for example, considering that the number of channels of an existing single DP / HDMI interface is 4, the maximum number of input channels can be 4; however, this disclosure does not limit this.
[0141] In this embodiment, the input bit width and output bit width of the first-level memory are the same, both equal to the bit width of the input channel connected to the first-level memory.
[0142] like Figures 4 to 7As shown, for example, the input channel width can be 24 bits / lane, and the input and output widths of the first-level memory Buffer1 can both be 24 bits. However, this disclosure is not limited in this respect, and the input channel width can be set to other widths as needed, as can the input and output widths of the first-level memory Buffer1.
[0143] In some exemplary implementations, such as Figures 4 to 7 As shown, when the first write signal wr_en1 is valid, data from the input channel is stored through at least one first-stage memory buffer 1. The first write signal wr_en1 can be generated by the preceding stage device of the data conversion device. For example, the first write signal wr_en1 can be determined by the data enable (DE) signal of the DP interface or the HDMI interface.
[0144] In some exemplary embodiments, the number of third-level memories is the same as the maximum number of output channels, and each third-level memory is configured to correspond one-to-one with one output channel.
[0145] like Figures 4 to 7 As shown, for example, the maximum number of output channels can be 8 or 16; however, this disclosure is not limited to this, for example, the maximum number of output channels can be any natural number greater than or equal to 1.
[0146] In this embodiment, the input bit width and output bit width of the third-level memory are the same, both equal to the bit width of the output channel connected to the third-level memory.
[0147] like Figures 4 to 7 As shown, for example, the output channel width can be 24 bits per channel (bit / lane), and the input and output widths of the third-level memory can both be 24 bits. However, this disclosure is not limited in this respect, and the output channel width can be set to other widths as needed, as can the input and output widths of the third-level memory.
[0148] In some exemplary embodiments, the method further includes:
[0149] The third read signal is controlled according to the preset timing sequence;
[0150] When the third read signal is enabled, the data in the third-level memory is read and distributed to the corresponding output channel.
[0151] For example, the specified timing can be Porch timing, which simplifies the design of the back-end mapped circuitry.
[0152] In some exemplary embodiments, the number of second-level memories is set according to the number of categories of input channels, and each second-level memory is connected to a first-level memory corresponding to a category of input channels.
[0153] Select the corresponding second-level memory based on the number of input channels and / or output channels, including:
[0154] Select one corresponding second-level memory based on the number of input channels, and select multiple corresponding third-level memories based on the pre-set number of output channels.
[0155] For example, such as Figure 4 As shown, the number of input channels can be 1, 2, or 4, meaning there are 3 types of input channel types. Therefore, there are 3 second-level memory buffers (Buffer2). The first second-level memory is connected to one first-level memory buffer (Buffer1), the second second-level memory buffer (Buffer2) is connected to two first-level memory buffers (Buffer1), and the third second-level memory buffer (Buffer2) is connected to four first-level memory buffers (Buffer1). When the number of input channels is 1, the corresponding second-level memory buffer (Buffer2) is selected to be connected to one first-level memory buffer (Buffer1) (i.e., the second-level memory buffer2 corresponding to path 1). When the number of input channels is 2, the corresponding second-level memory buffer (Buffer2) is selected to be connected to two first-level memory buffers (Buffer2) (i.e., the second-level memory buffer2 corresponding to path 2). When the number of input channels is 4, the corresponding second-level memory buffer (Buffer2) is selected to be connected to four first-level memory buffers (Buffer2) (i.e., the second-level memory buffer2 corresponding to path 3). Assuming the preset number of output channels is 8 (this disclosure does not limit this, and it can also be other values), the corresponding third-level memory Buffer3 is selected as all third-level memory Buffer3.
[0156] In some exemplary embodiments, the input bit width of each second-level memory is the same as the total output bit width of one or more first-level memories connected to the second-level memory, and the output bit width of each second-level memory is the same as the total output bit width of one or more third-level memories connected to the second-level memory.
[0157] For example, such as Figure 4As shown, the second-level memory Buffer2 corresponding to path 1 is connected to one first-level memory Buffer1 with an input bit width of 24 bits, and is connected to eight third-level memory Buffer3s with an output bit width of 192 bits. The second-level memory Buffer2 corresponding to path 2 is connected to two first-level memory Buffer1s with an input bit width of 48 bits, and is connected to eight third-level memory Buffer3s with an output bit width of 192 bits. The second-level memory Buffer2 corresponding to path 3 is connected to four first-level memory Buffer1s with an input bit width of 96 bits, and is connected to eight third-level memory Buffer3s with an output bit width of 192 bits.
[0158] like Figure 5 As shown, the second-level memory Buffer2 corresponding to path 1 connects to 4 first-level memory Buffers 1 with an input bit width of 96 bits, and connects to 4 third-level memory Buffers 3 with an output bit width of 96 bits. The second-level memory Buffer2 corresponding to path 2 connects to 4 first-level memory Buffers 1 with an input bit width of 96 bits, and connects to 8 third-level memory Buffers 3 with an output bit width of 192 bits. The second-level memory Buffer2 corresponding to path 3 connects to 4 first-level memory Buffers 1 with an input bit width of 96 bits, and connects to 12 third-level memory Buffers 3 with an output bit width of 288 bits. The second-level memory Buffer2 corresponding to path 4 connects to 4 first-level memory Buffers 1 with an input bit width of 96 bits, and connects to 16 third-level memory Buffers 3 with an output bit width of 384 bits.
[0159] In some other exemplary embodiments, the number of second-level memories is set according to the number of categories of output channels, and each second-level memory is connected to a third-level memory corresponding to a category of output channels.
[0160] Select the corresponding second-level memory based on the number of input channels and / or output channels, including:
[0161] Select multiple third-level memories and one second-level memory based on the number of output channels.
[0162] For example, such as Figure 5As shown, the number of output channels can be 4, 8, 12, or 16, meaning there are 4 types of output channels. Therefore, there are 4 second-level memory buffers. The first second-level memory buffer is connected to 4 third-level memory buffers, the second second-level memory buffer is connected to 8 third-level memory buffers, the third second-level memory buffer is connected to 12 third-level memory buffers, and the fourth second-level memory buffer is connected to 16 third-level memory buffers.
[0163] like Figure 5 As shown, when the number of output channels is 4, the corresponding multiple third-level memory Buffer3 and one second-level memory Buffer2 are selected as four third-level memory Buffer3 and the corresponding second-level memory Buffer2 connected to these four third-level memory Buffer3 (i.e., the second-level memory Buffer2 corresponding to path 1); when the number of output channels is 8, the corresponding multiple third-level memory Buffer3 and one second-level memory Buffer2 are selected as eight third-level memory Buffer3 and the corresponding second-level memory Buffer2 connected to these eight third-level memory Buffer3 (i.e., the second-level memory Buffer2 corresponding to path 2); when the number of output channels is 12, the corresponding multiple third-level memory Buffer3 and one second-level memory Buffer2 are selected as twelve third-level memory Buffer3 and the corresponding second-level memory Buffer2 connected to these twelve third-level memory Buffer3 (i.e., the second-level memory Buffer2 corresponding to path 3); when the number of output channels is 16, the corresponding multiple third-level memory Buffer3 and one second-level memory Buffer2 are selected as sixteen third-level memory Buffer3 and the corresponding second-level memory Buffer2 connected to these sixteen third-level memory Buffer3 (i.e., the second-level memory Buffer2 corresponding to path 4). Assuming the preset number of input channels is 4 (this disclosure does not limit this, and it can also be other values), then each second-level memory Buffer2 is connected to all first-level memory Buffer1.
[0164] In some other exemplary embodiments, the second-level memory includes a first sub-second-level memory and a second sub-second-level memory. The number of first sub-second-level memories is set according to the number of categories of input channels, and each first sub-second-level memory is connected to a first-level memory corresponding to a category of input channels. The number of second sub-second-level memories is set according to the number of categories of output channels, and each second sub-second-level memory is connected to a third-level memory corresponding to a category of output channels.
[0165] Select the corresponding second-level memory based on the number of input channels and / or output channels, including:
[0166] Select the corresponding first sub-secondary memory based on the number of input channels, and select the corresponding second sub-secondary memory and third-level memory based on the number of output channels.
[0167] For example, such as Figure 6 As shown, when the number of input channels is 1, the selected first sub-secondary level memory buffer 21 is the first sub-secondary level memory buffer 21 connected to one first-level memory buffer 1 (i.e., the first sub-secondary level memory buffer 21 corresponding to input path 1); when the number of input channels is 2, the selected first sub-secondary level memory buffer 21 is the first sub-secondary level memory buffer 21 connected to two first-level memory buffers 1 (i.e., the first sub-secondary level memory buffer 21 corresponding to input path 2); when the number of input channels is 4, the selected first sub-secondary level memory buffer 21 is the first sub-secondary level memory buffer 21 connected to four first-level memory buffers 1 (i.e., the first sub-secondary level memory buffer 21 corresponding to input path 3).
[0168] like Figure 6As shown, when the number of output channels is 4, the selected second sub-level memory buffer 22 is the second sub-level memory buffer 22 connected to four third-level memory buffers 3 (i.e., the second sub-level memory buffer 22 corresponding to output path 1); when the number of output channels is 8, the selected second sub-level memory buffer 22 is the second sub-level memory buffer 22 connected to eight third-level memory buffers 3 (i.e., the second sub-level memory buffer 22 corresponding to output path 2); when the number of output channels is 12, the selected second sub-level memory buffer 22 is the second sub-level memory buffer 22 connected to twelve third-level memory buffers 3 (i.e., the second sub-level memory buffer 22 corresponding to output path 3); when the number of output channels is 16, the selected second sub-level memory buffer 22 is the second sub-level memory buffer 22 connected to sixteen third-level memory buffers 3 (i.e., the second sub-level memory buffer 22 corresponding to output path 4).
[0169] The second read signal includes a first sub-second read signal and a second sub-second read signal. When the second read signal is enabled, data is read from the corresponding second-level memory and written to the corresponding third-level memory, including:
[0170] When the first sub-second read signal is enabled, the data of the corresponding first sub-second level memory is read and written to the corresponding second sub-second level memory.
[0171] When the second sub-second read signal is enabled, the data of the corresponding second sub-second-level memory is read and written to the corresponding third-level memory.
[0172] In this embodiment, the input bit width of each first sub-secondary level memory is the same as the total output bit width of one or more first-level memories connected to the first sub-secondary level memory, the output bit width of each first sub-secondary level memory is the same as the total output channel bit width corresponding to the preset minimum number of output channels, the input bit width of each second sub-secondary level memory is the same as the total output channel bit width corresponding to the preset minimum number of output channels, and the output bit width of each second sub-secondary level memory is the same as the total input bit width of one or more third-level memories connected to the second sub-secondary level memory.
[0173] For example, such as Figure 6As shown, the first sub-secondary level memory Buffer21 corresponding to input path 1 has 1 first-level memory Buffer1 connected to it, with an input bit width of 24 bits, a minimum number of output channels of 4, and an output bit width of 96 bits; the first sub-secondary level memory Buffer21 corresponding to input path 2 has 2 first-level memory Buffer1 connected to it, with an input bit width of 48 bits, a minimum number of output channels of 4, and an output bit width of 96 bits; the first sub-secondary level memory Buffer21 corresponding to input path 3 has 4 first-level memory Buffer1 connected to it, with an input bit width of 96 bits, a minimum number of output channels of 4, and an output bit width of 96 bits.
[0174] like Figure 6 As shown, the second sub-level memory Buffer 22 corresponding to output path 1 has a minimum of 4 output channels and an input bit width of 96 bits. It is connected to 4 third-level memory Buffers 3, with an output bit width of 96 bits. The second sub-level memory Buffer 22 corresponding to output path 2 has a minimum of 4 output channels and an input bit width of 96 bits. It is connected to 8 third-level memory Buffers 3, with an output bit width of 192 bits. The second sub-level memory Buffer 22 corresponding to output path 3 has a minimum of 4 output channels and an input bit width of 96 bits. It is connected to 12 third-level memory Buffers 3, with an output bit width of 288 bits. The second sub-level memory Buffer 22 corresponding to output path 4 has a minimum of 4 output channels and an input bit width of 96 bits. It is connected to 16 third-level memory Buffers 3, with an output bit width of 384 bits.
[0175] In some other exemplary embodiments, the second-level memory includes one, and the input bit width of the second-level memory is equal to the sum of the bit widths of all input channels, and the output bit width of the second-level memory is equal to the sum of the bit widths of all output channels.
[0176] like Figure 7 As shown, the sum of the bit widths of all input channels is 96 bits, the input bit width of the second-level memory Buffer2 is 96 bits, the sum of the bit widths of all output channels is 384 bits, and the output bit width of the second-level memory Buffer2 is 384 bits.
[0177] In some exemplary embodiments, when the number of input channels is fixed and the number of output channels is variable, reading the data from the corresponding second-level memory and writing it to the corresponding third-level memory includes: treating all the data in the second-level memory as valid data, and distributing the valid data to the corresponding output channels according to the number of output channels.
[0178] In some other exemplary embodiments, when the number of input channels is variable and the number of output channels is fixed, reading data from the corresponding second-level memory and writing it to the corresponding third-level memory includes: selecting valid data in the second-level memory according to the number of input channels, and distributing the selected valid data to all output channels.
[0179] In some other exemplary embodiments, when the number of input channels and the number of output channels are variable, reading data from the corresponding second-level memory and writing it to the corresponding third-level memory includes:
[0180] When the second read signal is enabled, data is read from the second-level memory;
[0181] Select valid data from the data to be read based on the number of input channels;
[0182] The selected valid data is written to the corresponding third-level memory based on the number of output channels.
[0183] The data conversion method of this disclosure can match interface circuits and mapping circuits with different numbers of channels by adjusting parameters, and has good versatility; by making the data continuous and specifying the timing output, the risk of errors in data transmission can be reduced and the design of the back-end circuit can be simplified.
[0184] This disclosure also provides a data conversion apparatus, which may include a processor and a memory storing a computer program executable on the processor, wherein the processor executes the computer program to implement the steps of the data conversion method as described in any of the preceding claims of this disclosure.
[0185] like Figure 9 As shown, in one example, the data conversion device may include: a processor 910, a memory 920, a bus system 930, and a transceiver 940. The processor 910, the memory 920, and the transceiver 940 are connected via the bus system 930. The memory 920 is used to store instructions and further includes a first-level memory, a second-level memory, and a third-level memory. The processor 910 executes the instructions stored in the memory 920 to control the transceiver 940 to transmit and receive signals. Specifically, under the control of the processor 910, the transceiver 940 can acquire a first user input, which includes the number of input channels and / or the number of output channels; select a corresponding second-level memory based on the number of input channels and / or the number of output channels, and control a first read signal and a second read signal; store data from the input channels in at least one first-level memory; when the first read signal is enabled, read the data from the first-level memory and write it to the corresponding second-level memory; when the second read signal is enabled, read the data from the corresponding second-level memory and write it to the third-level memory.
[0186] It should be understood that processor 910 can be a Central Processing Unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0187] Memory 920 may include read-only memory and random access memory, and provides instructions and data to processor 910. A portion of memory 920 may also include non-volatile random access memory. For example, memory 920 may also store device type information.
[0188] In addition to a data bus, the bus system 930 may also include a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 9 The general labeled all buses as Bus System 930.
[0189] In implementation, the processing performed by the processing device can be accomplished through integrated logic circuits in the hardware of the processor 910 or through software instructions. That is, the method steps of this embodiment can be executed by a hardware processor, or by a combination of hardware and software modules within the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other storage media. This storage medium is located in memory 920, and the processor 910 reads information from memory 920 and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, further details are omitted here.
[0190] This disclosure also provides a computer-readable storage medium storing executable instructions. When executed by a processor, these executable instructions can implement the data conversion method provided in any of the above embodiments of this disclosure. The data conversion method can acquire a first user input, including the number of input channels and / or the number of output channels; select a corresponding second-level memory based on the number of input channels and / or the number of output channels; control a first read signal and a second read signal; store data from the input channels in at least one first-level memory; when the first read signal is enabled, read the data from the first-level memory and write it to the corresponding second-level memory; when the second read signal is enabled, read the data from the corresponding second-level memory and write it to a third-level memory. Thus, when the number of input channels and / or the number of output channels changes, only parameter modification is needed to achieve correct connection between the two, without the complex process of modifying code and comprehensive implementation, thereby improving debugging efficiency. Furthermore, when the data input from the input channels is discontinuous, the data conversion device of this disclosure can make the output data continuous, thereby reducing the risk of errors during data transmission and simplifying the design of other backend modules. The method of driving data conversion by executing executable instructions is basically the same as the data conversion method provided in the above embodiments of this disclosure, and will not be described in detail here.
[0191] In some possible implementations, various aspects of the data conversion method provided in this application can also be implemented as a program product, which includes program code. When the program product is run on a computer device, the program code is used to cause the computer device to perform the steps in the data conversion method according to the various exemplary embodiments of this application described above. For example, the computer device can execute the data conversion method described in the embodiments of this application.
[0192] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0193] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0194] While the embodiments disclosed herein are as described above, the content is merely for the purpose of facilitating understanding of this disclosure and is not intended to limit the invention. Any person skilled in the art may make any modifications and changes to the form and details of the implementation without departing from the spirit and scope of this disclosure; however, the patent protection scope of this invention shall still be determined by the scope defined in the appended claims.
Claims
1. A data conversion method applied to a data conversion device, the data conversion device comprising at least one first-level memory, at least one second-level memory, and at least one third-level memory, wherein the first-level memory, the second-level memory, and the third-level memory are connected sequentially, the method comprising: Receive a first input, the first input including the number of input channels and / or the number of output channels; The system selects a corresponding second-level memory based on the number of input channels and / or output channels, and controls the first and second read signals based on the number of input channels and / or output channels. The number of second-level memories is set according to the number of categories of input channels, and each second-level memory is connected to a first-level memory corresponding to a category of input channels. Selecting a corresponding second-level memory based on the number of input channels and / or output channels includes: selecting one corresponding second-level memory based on the number of input channels, and selecting multiple corresponding third-level memories based on a preset number of output channels. Alternatively, the number of second-level memories is set according to the number of categories of output channels, and each second-level memory is connected to a third-level memory corresponding to a category of output channels. Selecting a corresponding second-level memory based on the number of input channels and / or output channels includes: selecting multiple corresponding third-level memories and one second-level memory based on the number of output channels. The data of the input channel is stored in at least one primary memory. When the first read signal is enabled, the data in the first-level memory is read and written to the corresponding second-level memory; When the second read signal is enabled, the corresponding data in the second-level memory is read and written to the third-level memory.
2. The data conversion method according to claim 1, wherein, The number of first-level memories is the same as the maximum number of input channels, and each first-level memory is connected to one of the input channels in a one-to-one correspondence.
3. The data conversion method according to claim 1, wherein, The number of third-level memories is the same as the maximum number of output channels, and each third-level memory is connected to one output channel in a one-to-one correspondence.
4. The data conversion method according to claim 1, wherein, The input bit width of each second-level memory is the same as the total output bit width of one or more first-level memories connected to the second-level memory, and the output bit width of each second-level memory is the same as the total output bit width of one or more third-level memories connected to the second-level memory.
5. The data conversion method according to claim 1, wherein, The second-level memory includes a first sub-second-level memory and a second sub-second-level memory connected in sequence. The number of the first sub-second-level memories is set according to the number of categories of the number of input channels, and each first sub-second-level memory is connected to a first-level memory corresponding to a category of input channels. The number of the second sub-second-level memories is set according to the number of categories of the number of output channels.
6. The data conversion method according to claim 5, wherein, The input bit width of each first sub-secondary memory is the same as the total output bit width of one or more first-level memories connected to the first sub-secondary memory. The output bit width of each first sub-secondary memory is the same as the total output channel bit width corresponding to a preset minimum number of output channels. The input bit width of each second sub-secondary memory is the same as the total output channel bit width corresponding to a preset minimum number of output channels. The output bit width of each second sub-secondary memory is the same as the total input bit width of one or more third-level memories connected to the second sub-secondary memory.
7. The data conversion method according to claim 5, wherein, The second read signal includes a first sub-second read signal and a second sub-second read signal; The step of selecting the corresponding second-level memory based on the number of input channels and / or the number of output channels includes: The first sub-secondary memory is selected according to the number of input channels, and the second sub-secondary memory and the third-level memory are selected according to the number of output channels. The step of reading data from the first level memory and writing it to the corresponding second level memory when the first read signal is enabled, and reading data from the corresponding second level memory and writing it to the third level memory when the second read signal is enabled, includes: reading data from the first level memory and writing it to the corresponding first sub-second level memory when the first read signal is enabled; reading data from the corresponding first sub-second level memory and writing it to the corresponding second sub-second level memory when the first sub-second read signal is enabled; and reading data from the second sub-second level memory and writing it to the corresponding third level memory when the second sub-second read signal is enabled.
8. The data conversion method according to claim 1, wherein, The second-level memory includes one unit, and the input bit width of the second-level memory is equal to the sum of the bit widths of all the input channels, and the output bit width of the second-level memory is equal to the sum of the bit widths of all the output channels; When the second read signal is enabled, reading the data from the corresponding second-level memory and writing it to the corresponding third-level memory includes: When the second read signal is enabled, data is read from the second-level memory; Select valid data from the read data based on the number of input channels; The selected valid data is written into the corresponding third-level memory according to the number of output channels.
9. The data conversion method according to claim 1, further comprising: The third read signal is controlled according to the preset timing sequence; When the third read signal is enabled, the data in the third-level memory is read and distributed to the corresponding output channel.
10. A data conversion apparatus, comprising a memory; and a processor connected to the memory, the memory being used to store instructions, the memory further comprising a first-level memory, a second-level memory, and a third-level memory, the processor being configured to perform the steps of the data conversion method as claimed in any one of claims 1 to 9 based on the instructions stored in the memory.
11. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data conversion method as described in any one of claims 1 to 9.
12. A data conversion apparatus, comprising: The circuit includes a channel number control circuit, a data continuity circuit, a data reconstruction circuit, and a data distribution circuit, among which: The channel number control circuit is used to receive a first input, the first input including the number of input channels and / or the number of output channels, select the corresponding second-level memory and third-level memory according to the number of input channels and / or the number of output channels, and control the first read signal and the second write signal according to the number of input channels and / or the number of output channels. The data continuity circuit includes a plurality of first-level memories for storing data from the input channel through at least one first-level memory. The data distribution circuit includes multiple third-level memories; The data reconstruction circuit includes at least one second-level memory for receiving a first read signal and a second write signal. When the first read signal is enabled, data in the first-level memory is read and written to the corresponding second-level memory; when the second write signal is enabled, data in the corresponding second-level memory is read and written to the third-level memory. The first-level memory, second-level memory, and third-level memory are connected sequentially. The number of second-level memories is set according to the number of input channel categories, and each second-level memory is connected to a first-level memory corresponding to a certain type of input channel. Selecting the corresponding second-level memory and third-level memory according to the number of input channels and / or output channels includes: selecting one corresponding second-level memory according to the number of input channels, and selecting multiple corresponding third-level memories according to a pre-set number of output channels; or, the number of second-level memories is set according to the number of output channel categories, and each second-level memory is connected to a third-level memory corresponding to a certain type of output channel. Selecting the corresponding second-level memory and third-level memory according to the number of input channels and / or output channels includes: selecting multiple corresponding third-level memories and one second-level memory according to the number of output channels.
Citation Information
Patent Citations
Super-multichannel embedded high-speed signal acquisition and processing system and method
CN111614357A
Core-driven translation and loopback test
US20130290594A1
