This application claims the priority benefit of Chinese Patent Application Serial Number 202211101254.3, filed on Sep. 9, 2022, the full disclosure of which is incorporated herein by reference.
The present disclosure relates to the technical field of universal asynchronous transceiver, particularly to a multi-path universal asynchronous transceiver and transmission method thereof.
At present, in the development process of embedded die, when adjusting and testing to see whether the embedded die satisfies the requirements in functionality, it would be connected to a display for presenting the state of the embedded die. This connection between the embedded die and the display is achieved by respectively installing a universal asynchronous transceiver (UART) to both the embedded die and the display and allowing the two UARTs to be connected. Then, if users wish to check the functions of each of the modules of the embedded die (e.g. central processing unit, wireless communication module, etc.), a logger in the module can be connected to the universal asynchronous transceiver to transmit a log information of the logger to the display for display by the universal asynchronous transceiver.
The UART in the prior arts comprises a transmitter (TX), a receiver (Rx), and a buffer. The buffer is firstly connected to the transmitter and the receiver. Next, when the embedded die and the display are connected through the UART, the transmitter of the embedded die is connected to the receiver of the display, and the receiver of the embedded die is connected to the transmitter of the display. When the logger of the embedded die is connected to the buffer and a log information is generated, the log information is transmitted to the buffer then is transmitted to the transmitted by the buffer. The transmitter would then package the log information to generate a UART data package which is then transmitted to the receiver of the display in a first input first output (FIFO) manner. When the receiver receives the UART data packet, it would de-package the UART data packet to generate the log information to the buffer of the display and transmit the log information to the display for displaying.
However, the logger generates the log information according to the execution state of each module to allow developers to adjust and test the function of each module of the embedded die according to the log information. Also, the UART data packets are transmitted between the UARTs in a first input first output manner.
As a result, when the embedded die comprises a plurality of dies, which respectively comprises the processor, in which the logger is included, each logger should transmit the UART data packet to the display for displaying by the transmitter on each own. So, the plurality of transmitters would be having a plurality of transmission pins, which is unnecessary as a resource waste.
To avoid that, the plurality of loggers are configured to work as transmission with the same buffer and the same transmitter. Respective log information of the plurality of processors is then mixed with others, thereby causing a disorder in the log information. So, the status of each module could not be correctly determined.
Thus, an improved solution for the prior arts is essential.
The embodiments of the present disclosure provide a multi-path universal asynchronous transceiver (Multi-path UART) and transmission method thereof to respectively receive the log information through a tx aggregation and arbitration circuit to avoid resource wasting and disordered log information for resource conservation and log information correctness.
The present disclosure provides a multi-path UART, which comprises:
Preferably, the multi-path UART further comprises:
Preferably, the tx aggregation and arbitration circuit compares the at least one of first log information or the at least one of second log information according to the predetermined threshold to determine whether the at least one of first log information or the at least one of second log information conforms to the predetermined threshold. If so, the at least one of first log information packet or the at least one of second log information packet can be generated.
Preferably, the predetermined threshold is an information data volume.
Preferably, the predetermined threshold is a time data.
Preferably, the tx aggregation and arbitration circuit compares a first data volume of the at least one of first log information or a second data volume of the at least one of second log information according to the information data volume to determine whether the first data volume or the second data volume is greater than the information data volume. If so, the at least one of first log information packet or the at least one of second log information packet can be generated.
Preferably, the first buffer further comprises:
Preferably, the second buffer further comprises:
Preferably, the tx aggregation and arbitration circuit clears a first time data or the second time data to return the first time data or the second time data to zero.
Preferably, the transmission buffer has a memory capacity. The tx aggregation and arbitration circuit compares at least one of received first log information packet or at least one of received second log information packet according to the memory capacity to determine whether the memory capacity is exceeded. If so, the obtaining of the at least one of first log information and the at least one of second log information would be stopped.
Preferably, the at least one of first log information packet and the at least one of second log information packet respectively comprise a header.
Preferably, the header comprises a synchronous pattern data, a path number data, and a checksum data.
Preferably, the header further comprises a payload length data.
With the above-mentioned configuration, the tx aggregation and arbitration circuit polls the first buffer and the second buffer to execute the arbitration procedure respectively with the predetermined threshold during polling according to the at least one of first log information cached in the first buffer or the at least one of second log information cached in the second buffer to obtain the at least one of first log information packet and the at least one of second log information packet correspondingly. Thus, when inputting a plurality of log sources, it is not necessary to have a plurality of output pins and to avoid disorder caused by the cross-influence of multiple log information for resource conservation and providing log information correctness.
The present disclosure also provides a multi-path UART transmission method, applied by a multi-path universal asynchronous transceiver, which comprises a first buffer, a second buffer, and a tx aggregation and arbitration circuit. The first buffer and the second buffer respectively cache at least one of first log information and at least one of second log information. The multi-path UART transmission method is executed by the tx aggregation and arbitration circuit comprises:
Preferably, the header further comprises a payload length data.
Preferably, comparing the at least one of first log information and the at least one of second log information with the predetermined threshold to determine whether the at least one of the first log information and the at least one of second log information conforms to the predetermined threshold; if so, the at least one of first log information packet and the at least one of second log information packet be generated.
Preferably, the predetermined threshold is an information data volume and a time data.
Preferably, comparing a second data volume of the at least one of first log information and a second data volume of the at least one of second log information with the information data volume to determine whether the first data volume and the second data volume is greater than the information data volume; if so, the at least one of first log information packet and the at least one of second log information packet be generated.
With the above-mentioned method, the tx aggregation and arbitration circuit polls the first buffer and the second buffer to execute the arbitration procedure respectively with the predetermined threshold during polling according to the at least one of first log information cached in the first buffer or the at least one of second log information cached in the second buffer to obtain the at least one of first log information packet and the at least one of second log information packet correspondingly. Thus, when inputting a plurality of log sources, it is not necessary to have a plurality of output pins and to avoid disorder caused by the cross-influence of multiple log information for resource conservation and providing log information correctness.
It should be understood, however, that this summary may not contain all aspects and embodiments of the present disclosure, that this summary is not meant to be limiting or restrictive in any manner, and that the disclosure as disclosed herein will be understood by one of ordinary skill in the art to encompass obvious improvements and modifications thereto.
The features of the exemplary embodiments believed to be novel and the elements and/or the steps characteristic of the exemplary embodiments are set forth with particularity in the appended claims. The Figures are for illustration purposes only and are not drawn to scale. The exemplary embodiments, both as to organization and method of operation, may best be understood by reference to the detailed description which follows taken in conjunction with the accompanying drawings in which:
The present disclosure will now be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the disclosure are shown. This present disclosure may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this present disclosure will be thorough and complete, and will fully convey the scope of the present disclosure to those skilled in the art.
Certain terms are used throughout the description and following claims to refer to particular components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but function. In the following description and in the claims, the terms “include/including” and “comprise/comprising” are used in an open-ended fashion, and thus should be interpreted as “including but not limited to”. “Substantial/substantially” means, within an acceptable error range, the person skilled in the art may solve the technical problem in a certain error range to achieve the basic technical effect.
The following description is of the best-contemplated mode of carrying out the disclosure. This description is made for the purpose of illustration of the general principles of the disclosure and should not be taken in a limiting sense. The scope of the disclosure is best determined by reference to the appended claims.
Moreover, the terms “include”, “contain”, and any variation thereof are intended to cover a non-exclusive inclusion. Therefore, a process, method, object, or device that includes a series of elements not only includes these elements, but also includes other elements not specified expressly, or may include inherent elements of the process, method, object, or device. If no more limitations are made, an element limited by “include a/an . . . ” does not exclude other same elements existing in the process, the method, the article, or the device which includes the element.
As shown in
Specifically, the TAA circuit 13 polls the first buffer 11 and the second buffer 12 according to the predetermined threshold to query the first log information of the first buffer 11 and the second log information of the second buffer 12 in order, whether to provide the first log information and the second log information. The TAA circuit 13 performs an arbitration procedure on the first log information in the first buffer 11 and the second log information in the second buffer 12 to correspondingly obtain a first log information packet and a second log information packet.
In this embodiment, the first buffer 11 further comprises a first input terminal Input1. The second buffer 12 further comprises a second input terminal Input2.
For example, as shown in
In this embodiment, as shown in
In this embodiment, as shown in
In this embodiment, when the TAA circuit 13 receives the first log information and the second log information, the TAA circuit 13 compares the first log information or the second log information according to the predetermined threshold to determine whether the first log information or the second log information conforms to the predetermined threshold. If so, the first log information packet or the second log information packet would be generated. If not, the TAA circuit 13 would poll to the next buffer. In this embodiment, the predetermined threshold is an information data volume or a time data.
In this embodiment, the first log information has a first data volume, and the second log information has a second data volume. When the predetermined threshold represents an information data volume, the TAA circuit 13 would receive the first log information, and then would compare the first data volume according to the information data volume to determine whether the first data volume is greater than the information data volume. If so, the first log information packet is generated; if not, the second buffer 12 is polled. Then, the TAA circuit 13 receives the second log information and then compares the second data volume according to the information data volume to determine whether the second data volume is greater than the information data volume. If so, the second log information packet is generated; if not, the first buffer 11 is polled.
In this embodiment, as shown in
In the above embodiment, when the TAA circuit 13 determines that the first data volume or the second data volume is smaller than the information data volume, it would further determine whether the first time data or the second time data is greater than the time data. If so, the first log information packet or the second log information packet would be generated; if not, a polling would be performed.
In this embodiment, the transmission buffer 14 has a memory capacity. The TAA circuit 13 compares the received first log information packet and the second log information packet according to the memory capacity to determine whether the memory capacity is exceeded. If so, the obtaining of the first log information packet and the second log information packet would be stopped; if not, the polling to the first buffer and the second buffer may continue. Specifically, when the first function circuit 20 and the second function circuit 21 respectively transmit the first log information packet and the second log information packet to the first buffer 11 and the second buffer 12, they would determine whether the first data volume of the first log information packet or the second data volume of the second log information packet is greater than the memory capacity according to the memory capacity of the transmission buffer 14. When the first data volume or the second data volume, or the first data volume and the second data volume are greater than the memory capacity, the first function circuit 20 or the second function circuit 21 would stop the transmission of the first log information packet or the second log information packet.
In this embodiment, as shown in
In this embodiment, as shown in
For example, as shown in
As shown in
In this embodiment, as shown in
In this embodiment, as shown in
In this embodiment, the information data volume, the first data volume, and the second data volume are the volume occupied by specific data, of which the unit is byte.
In this embodiment, as shown in
In this embodiment, as shown in
In this embodiment, as shown in
In summary, the present disclosure provides multi-path universal asynchronous transceiver and transmission method thereof. Through the tx aggregation and arbitration circuit 13 and the buffer corresponding to the plurality of log sources, the tx aggregation and arbitration circuit 13 could cooperate with the buffer. So, the tx aggregation and arbitration circuit 13 could poll the buffer to execute the arbitration procedure respectively with the predetermined threshold during polling according to the first log information cached in the first buffer or the second log information cached in the second buffer to obtain the first log information packet and the second log information packet correspondingly. Thus, when inputting a plurality of log sources, it is not necessary to have a plurality of output pins and to avoid disorder caused by the cross-influence of multiple log information for resource conservation and providing log information correctness.
It is to be understood that the term “comprises”, “comprising”, or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device of a series of elements not only comprise those elements but further comprises other elements that are not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element defined by the phrase “comprising a . . . ” does not exclude the presence of the same element in the process, method, article, or device that comprises the element.
Although the present disclosure has been explained in relation to its preferred embodiment, it does not intend to limit the present disclosure. It will be apparent to those skilled in the art having regard to this present disclosure that other modifications of the exemplary embodiments beyond those embodiments specifically described here may be made without departing from the spirit of the disclosure. Accordingly, such modifications are considered within the scope of the disclosure as limited solely by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
202211101254.3 | Sep 2022 | CN | national |