WO2009030129A1 - Information transceiving method of asynchronous serial data line and asynchronous serial transceiver - Google Patents

Information transceiving method of asynchronous serial data line and asynchronous serial transceiver Download PDF

Info

Publication number
WO2009030129A1
WO2009030129A1 PCT/CN2008/071466 CN2008071466W WO2009030129A1 WO 2009030129 A1 WO2009030129 A1 WO 2009030129A1 CN 2008071466 W CN2008071466 W CN 2008071466W WO 2009030129 A1 WO2009030129 A1 WO 2009030129A1
Authority
WO
WIPO (PCT)
Prior art keywords
sequence
length
break
idle
received
Prior art date
Application number
PCT/CN2008/071466
Other languages
French (fr)
Chinese (zh)
Inventor
Keping Feng
Original Assignee
Maipu Communication Technology Co., Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co., Ltd. filed Critical Maipu Communication Technology Co., Ltd.
Publication of WO2009030129A1 publication Critical patent/WO2009030129A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4286Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a handshaking protocol, e.g. RS232C link

Definitions

  • the invention relates to the field of data communication, in particular to a heterogeneous serial data transceiving technology.
  • the information on the different serial data signal line includes character data information and non-character information, and the non-character information includes an Idle sequence and a Break sequence.
  • the Idle sequence is a continuous logic 1, indicating that the interface data signal line is idle.
  • the Break sequence is a continuous logical 0 greater than or equal to one character length (including start and stop bits) as an in-band control signal.
  • the universal isochronous transceiver (UART) includes a character transceiver, an interrupt controller, a receive data signal line (RXD) connected to the input of the character transceiver, an output terminal of the character transceiver and a transmit data signal line. (TXD) is connected, the control end of the character transceiver is connected to the interrupt controller, and the character transceiver and the interrupt controller communicate with the system through the local bus (Localjms), respectively.
  • the universal isochronous transceiver receives the Idle sequence without directly generating any receiving action, and the application system can only indirectly determine that the unreceived information is the received Idle sequence; and indirectly sends the Idle sequence by stopping the sending method.
  • the universal isochronous transceiver can only generate report information at the beginning and end of the receive Break sequence; control the start and end of the send Break sequence.
  • Some communication protocols need to directly receive and transmit Idle and Break sequences.
  • the implementation of such communication protocols by using a universal isochronous transceiver requires an external timer. Under the control software, the Idle and Break sequences are received and sent indirectly.
  • the technical problem to be solved by the present invention is to provide a method for quantitatively transmitting and receiving non-character information without relying on an external timer and an isochronous serial transceiver implementing the method.
  • the technical solution adopted by the present invention to solve the above technical problem is: providing a method for transmitting and receiving information of a different serial data line, wherein the heterogeneous serial transceiver transmits and receives character data information through a different serial data line, and is characterized in that Including the steps to send and receive non-character information: a.
  • the heterogeneous serial transceiver receives non-character information from the different serial data lines, it identifies the sequence type of the non-character information and counts the sequence length of the non-character information, quantitatively receives the non-character information, and reports the received non-character to the system. Character information event;
  • the heterogeneous serial transceiver sends non-character information to the different serial data line
  • the non-character information is quantitatively transmitted according to the non-character information event received from the system.
  • Non-character information is an Idle sequence or a Break sequence.
  • the isochronous serial transceiver ignores the Idle sequence and does not report to the system that the Idle sequence event is received;
  • the Idle sequence length of the heterogeneous serial transceiver is equal to the statistical Idle sequence length, and reports the received Idle sequence event to the system.
  • the isochronous serial transceiver will The system reports that the Idle sequence event is received once and the re-segmentation statistics Idle sequence length is cleared until the end of the Idle sequence, and the Idle sequence event is reported to the system for the last time; except for the last report receiving the Idle sequence event, The serial length of the Idle sequence received by the serial transceiver is equal to the length of the Idle sequence segment report; the last time the Idle sequence event is received, the Idle sequence length of the heterogeneous serial transceiver is equal to the Idle sequence of the last segmentation statistics. length;
  • the heterogeneous serial transceiver reports to the system that the Idle sequence event is received and cleared.
  • the heterogeneous serial transceiver stops counting and reports to the system the Idle sequence event is received last time; except the last report receives the Idle sequence
  • the length of the Idle sequence received by the heterogeneous serial transceiver is equal to the length of the Idle sequence segment report; the last time the Idle sequence event is received, the isochronous serial transceiver quantizes the received Idle sequence.
  • the isochronous serial transceiver When the isochronous serial transceiver sends the Idle sequence to be sent, and other character information or non-character information sequence needs to be sent according to the system sending event queue order, the isochronous serial transceiver sends the sequence according to the system sending event queue. Content to be sent;
  • the heterogeneous serial data transceiver reports to the system that the Break sequence event is received, and proceeds to step (2);
  • the isochronous serial transceiver reports the receipt of the Break sequence and the Break sequence termination event to the system immediately after counting the length of the Idle sequence;
  • the length of the Break sequence received by the device is equal to the length of the statistical Break sequence;
  • the isochronous serial transceiver will The system reports that the Break sequence event is received once and the resegmentation statistics Break sequence length is cleared until the end of the Break sequence, and the last time the report receives the Break sequence event and the Break sequence termination event; except for the last report received Break
  • the length of the Break sequence received by the heterogeneous serial transceiver is equal to the length of the Break sequence segment report; the last time the report receives the Break sequence event, the length of the Break sequence received by the heterogeneous serial transceiver is equal to the last time.
  • the length of the Break sequence of the segment statistics are used to the length of the Break sequence of the segment statistics.
  • the isochronous serial transceiver reports to the system that the Break sequence event is received and cleared. Re-segmentation statistics the length of the Break sequence until the accumulated Break sequence length is equal to the maximum value of the Break sequence.
  • the heterogeneous serial transceiver stops counting and reports to the system the last time the receipt of the Break sequence event is not reported until the end of the Break sequence.
  • Break sequence termination event except for the last report receipt of the Break sequence event, the length of the Break sequence received by the heterogeneous serial transceiver is equal to the length of the Break sequence segment report; the last report receives the sequence sequence event in the Break sequence event
  • the length of the Break sequence received by the device is equal to the length of the Break sequence when the last segment statistics are accumulated to the maximum value of the Break sequence; the Break sequence to be received refers to a consecutive Break sequence on the different serial data lines.
  • the step b sends the non-character information quantitatively, and when the Break sequence is sent, the specific: the length of the Break sequence to be sent is preset;
  • the isochronous serial transceiver When the isochronous serial transceiver sends the Break sequence to be sent, and other character information or non-character information sequence needs to be sent according to the sequence of the event queue sent by the system, the isochronous serial transceiver sends the sequence according to the system sending event queue. Content to be sent;
  • the isochronous serial transceiver sends the Break sequence to be sent, and the isochronous serial transceiver has nothing to send, the isochronous serial transceiver sends the Idle sequence until it receives the system to send the event.
  • the invention also provides an isochronous serial transceiver implementing the above method, comprising a character transceiver, an interrupt controller, an interrupt controller connected to the character transceiver, a non-character information identifier, a quantitative receiving unit, and a non-character
  • a character transceiver comprising a character transceiver, an interrupt controller, an interrupt controller connected to the character transceiver, a non-character information identifier, a quantitative receiving unit, and a non-character
  • the input end of the information recognizer and the input end of the character transceiver are respectively connected to the receiving data signal line;
  • the non-character information identifier is connected to the quantitative receiving unit;
  • the output end of the quantitative receiving unit is connected to the interrupt controller;
  • the quantitative receiving unit includes a counter, a receiving comparator, a receiving comparison register, a non-character information controller, a receiving length register, and a receiving queue controller; the non-character information identifier is connected to the counter; and the receiving comparison register and the receiving comparator are The input terminal is connected, and the other input terminal of the receiving comparator is connected to the counter; the non-character information controller is respectively connected to the receiving comparator, the counter, and the non-character information identifier; the control end of the non-character information controller is connected to the counter; the non-character The output end of the information controller is respectively connected to the receiving length register and the receiving queue controller, and the output end of the receiving queue controller is connected to the interrupt controller;
  • the receiving comparison register is configured to store a preset control receiving sequence length value;
  • the receiving comparator is configured to compare a sequence length of the non-character information to be received and a control receiving sequence length value, and output the comparison result to the non-character information controller;
  • heterogeneous serial transceiver further includes a quantitative transmitting unit, and the output of the quantitative transmitting unit is connected to the transmitting data signal line.
  • Figure 1 is a schematic diagram of a general-purpose heterotransistor
  • FIG. 2 is a schematic diagram of an isochronous serial transceiver of the present invention
  • the quantitative receiving unit comprises a counter, a receiving comparator, a receiving comparison register, a non-character information controller, a receiving length register, and a receiving queue controller; the non-character information identifier is connected to the counter; and the counter is used for counting the non-character information identifier recognized by the identifier
  • the sequence length of the non-character information sequence (non-character information to be received);
  • the receive compare register is connected to one input of the receive comparator, and the other input of the receive comparator is connected to the counter;
  • the non-character information controller is compared with the receive
  • the counter, the non-character information identifier is connected; the control end of the non-character information controller is connected to the counter;
  • the receive comparator, the receive compare register, and the non-character information controller are used to quantitatively receive the non-character information sequence.
  • the non-character information recognizer is connected to the counter.
  • the non-character information recognizer outputs a signal to the non-character information controller to inform that it has received the non-character information;
  • the receiving comparator receives the sequence length of the non-character information sequence counted by the counter on the one hand, and receives the comparison register in the other hand on the other hand.
  • the determined length value is compared with the sequence length of the non-character information sequence counted by the counter, and the comparison result is sent to the non-character information controller, and the comparison result is used to control the non-character information sequence directly obtained by the non-character information controller from the counter.
  • the sequence length is subjected to quantitative reception processing, that is, the control non-character information controller writes the quantitatively received non-character information into the reception length register and reports to the reception queue controller that the non-character information sequence event is received; the character transceiver, the non-character
  • the output of the information controller is connected to the receiving queue controller, and the receiving queue controller organizes the reporting events from the non-character information controller and the character transceiver into a queue, and sequentially issues an event reporting signal to the interrupt controller.
  • the quantitative sending unit comprises a sending queue controller and a sending length register; the character transceiver is connected to an input end of the sending queue controller, and the sending length register stores a preset non-character information sending comparison value; the sending length register and the sending queue control The other input of the device is connected; the output of the transmit queue controller is connected to send the data signal line; the send queue controller root According to the set length of the non-character information sequence to be sent, the transmission state of the current non-character information sequence is controlled, and the heterogeneous serial data is sent to the transmission data signal line in a quantitative manner, thereby achieving the purpose of quantitative transmission.
  • non-character information can be quantitatively transmitted and received without setting the quantitative transmitting unit.
  • the quantitative receiving unit sends an event reporting signal to the interrupt controller in sequence
  • the system sends the isochronous serial data.
  • the quantitative receiving unit includes an Idle sequence quantitative receiving unit and a Break sequence quantitative receiving unit
  • the quantitative transmitting unit includes an Idle sequence quantitative transmitting unit, and a Break sequence quantitative transmitting unit. unit.
  • the length of the character data is in bytes; since both the Idle sequence and the Break sequence are repeated symbol sequences, the length of the Idle sequence and the Break sequence are in units of symbols.
  • the quantitative transceiver is the maximum and minimum lengths that limit the length of the Idle sequence received by the isoband serial transceiver from the isochronous serial data line and the Idle sequence to the isochronous serial data line;
  • the serial transceiver receives the Break sequence from the different serial data lines and the maximum length of the Break sequence transmitted to the different serial data lines.
  • Idle sequence maximum register A read/write register, which is one of the receive compare registers, is used to set a desired limit length value for a long Idle sequence, that is, the maximum length of the received Idle sequence, and the receive length is limited;
  • Idle sequence segment report register read/write register, which is one of the receive compare registers, used to set the desired report interval length value by the system when the received Idle sequence limit register setting value is large, the transceiver segment of the present invention Reporting Idle sequence events to the system to improve the real-time performance of the report;
  • receiving the Idle sequence length register a read-only register, configured to load the received quantitative Idle sequence length value when the transceiver reports to the system that the Idle sequence event is received;
  • Idle sequence accumulation counter an internal counter for accumulating the length of the continuous Idle sequence from the start of the Idle sequence
  • Break sequence maximum register A read/write register, which is one of the receive compare registers, is used to set a desired limit length value for a long Break sequence, which is the maximum length of the receive Break sequence, and limits the receive length. ;
  • Break sequence segment report register A read/write register, which is one of the receive compare registers, which is used to set the desired report interval length value when the Receive Break sequence limit register is set to a large value; The segment reports to the system the receipt of the Break sequence event to ensure the real-time nature of the report;
  • a read-only register which is one of the receive compare registers, is used to report the received Break sequence event to the system when the heterogeneous serial transceiver reports the received Break sequence event, and loads the received quantitative Break sequence length value;
  • the heterogeneous serial transceiver quantitative receiving Idle sequence specifically includes the following processing:
  • Idle sequence minimum Idle sequence segmentation report length
  • Idle sequence maximum The value of the set Idle sequence is stored in the Idle sequence minimum value register, the Idle sequence segment value is stored in the Idle sequence segment report register, and the Idle sequence maximum value is stored in the Idle sequence maximum value register; Value > Idle sequence segment report length > Idle sequence minimum;
  • the Idle sequence to be received refers to a continuous Idle sequence on the isochronous serial data line;
  • the heterogeneous serial transceiver reports to the system that the Idle sequence event is received and cleared.
  • Zero re-segmentation statistics The length of the Idle sequence. For the Idle sequence divided into multiple segments, the accumulated Idle sequence length is unclear, and the length of the Idle sequence is continued from the start of the Idle sequence until the accumulated Idle sequence length is equal to Idle.
  • the isochronous serial transceiver stops counting and reports to the system the last time the Idle sequence event is received.
  • the isochronous serial transceiver no longer reports the receipt of the long-length Idle sequence event until the start of the next Idle sequence. Recounting; except for the last report receiving the Idle sequence event, the Idle sequence length of the heterogeneous serial transceiver is equal to the length of the Idle sequence segment report; the last time the Idle sequence event is received, the isochronous serial transceiver The length of the Idle sequence that is quantitatively received is equal to the length of the Idle sequence of the last segmentation count when the maximum value of the Idle sequence is accumulated.
  • the isochronous serial transceiver reports the receipt of the Break sequence and the Break sequence termination event to the system immediately after counting the length of the Idle sequence;
  • the length of the Break sequence received by the device is equal to the length of the statistical Break sequence;
  • the heterogeneous serial transceiver quantitatively transmits the Break sequence, and includes the following steps: according to the pre-set break sequence to be sent in the Transmit Length register;
  • the isochronous serial transceiver When the isochronous serial transceiver sends the Break sequence to be sent, and other character information or non-character information sequence needs to be sent according to the sequence of the event queue sent by the system, the isochronous serial transceiver sends the sequence according to the system sending event queue. Content to be sent;
  • the Idle sequence is transmitted until the system sends the event.
  • the interface connected to the system by the different serial serial transceiver includes an interrupt request signal line INT and a local bus Local_bus, and the interface connected to the different serial level conversion circuit includes a transmission signal line TXD and a received signal. Line RXD.
  • the isochronous serial control signal line is not shown in Fig. 3, and will not be described below.
  • the receiving data signal line RXD in the different serial serial transceiver is respectively connected with the non-character information identifier and the character transceiver; the non-character information identifier is connected by the Idle serial quantitative receiving unit and the Break sequence quantitative receiving unit respectively; the quantitative transmitting unit and the interrupt The controller is connected, and the quantitative transmitting unit is also connected to the character transceiver and the transmission data signal line TXD.
  • the Idle sequence quantitative receiving unit includes an Idle sequence reporting counter, an Idle sequence accumulating counter, an Idle sequence segment reporting register, an Idle sequence minimum register, an Idle sequence maximum register, an Idle sequence controller, a receiving Idle sequence length register, Receive queue controller.
  • the Idle sequence quantitation transmitting unit includes an Idle sequence transmission length register and a transmission queue controller.
  • the Break sequence quantitative receiving unit includes a Break Sequence Report Counter, a Break Sequence Accumulation Counter, a Break Sequence Segment Report Register, a Break Sequence Maximum Register, a Break Sequence Controller, a Receive Break Sequence Length Register, and a Receive Queue Controller.
  • the Break sequence quantitative transmitting unit includes a Break sequence transmission length register and a transmission queue controller.
  • the character transceiver is configured to send and receive different character data, and the function and the use method of the received character of the heterogeneous serial transceiver of the present invention are the same as those of the universal isochronous transceiver.
  • the character transceiver of the present invention also increases the output of one signal: Re C _ch ar signal (received character signal).
  • the Re C _ch ar signal is logic 0 from the start bit of a character symbol sequence to the end of the stop bit, and the other time is logic 1, that is, when the Re C _ch ar signal is logic 1, it indicates the slave data signal line RXD. A non-character symbol was received on it.
  • the character transceiver starts from the start bit, detects that the data bit symbol is all 0s, and the stop bit symbol is also 0, that is, the Break sequence is determined, and the output detects the Break sequence signal to the Break sequence controller. Since the character transceiver checks the length of the entire character symbol to recognize the Break sequence, the Re C _ch ar signal output by the character transceiver is logic 0 during the entire character symbol length check, that is, when the Break sequence occurs, the character The transceiver outputs the Rec-char signal to the logical 1 starting position that lags the start of the actual Break sequence by one character length.
  • the Idle signal is output to the Idle sequence report counter and the Idle sequence accumulation counter.
  • the Idle sequence report counter and the Idle sequence accumulation counter are counted while the non-character information recognizer outputs the Idle signal to logic 1, and the frequency of the clock signal used for counting is the same as the character baud rate.
  • the count output of the Idle sequence report counter is used as an input value of the comparator 1
  • the set value of the Idle sequence segment report register is used as another input value of the comparator 1 once the count output value of the Idle sequence report counter is greater than or equal to The set value of the Idle sequence segment report register, the comparison result signal of comparator 1 is logic 1, otherwise it is logic 0.
  • the comparison result signal of the comparator 1 is output to the Idle sequence controller.
  • the Idle sequence controller When the state of the Idle signal output by the non-character information recognizer is logic 1, when the comparison result signal state of the comparator 3 changes from logic 0 to logic 1, indicating that the currently received Idle sequence length reaches the maximum value of the Idle sequence, the Idle sequence controller will The count output value of the Idle sequence length report counter is written to the receive Idle sequence length register and the Idle sequence event is reported to the receive queue controller.
  • the Idle sequence controller issues a clear signal 1 (logic 0 level signal) to clear and block the Idle sequence length report counter, issues a clear signal 2 clear and blocks the receive Idle sequence length accumulation counter, during the subsequent period of the Idle sequence The clear and blocked state is maintained until the Idle sequence is terminated, and the Idle sequence controller issues a clear signal 1 (logic 1 level signal) and a clear signal 2 (logic 1 level signal) to release the length of the Idle sequence. Report counter and Idle sequence length accumulation counter blockade.
  • the receiving Idle sequence reports that the controller has no action.
  • the count output of the Break sequence report counter is used as an input value of the comparator 4, and the set value of the Break sequence segment report register is used as another input value of the comparator 4, once the count output value of the Break sequence report counter is greater than or equal to the receive Break
  • the set value of the sequence segment report register the comparison result signal of comparator 4 is logic 1, otherwise it is logic 0.
  • the comparison result signal of the comparator 4 is output to the Break sequence controller.
  • the Break sequence report controller receives the Receive Sequence termination event.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

The field of data communication, especially the asynchronous serial transceiving technology is involved in this invention. The problem to be solved is: providing a method and an asynchronous serial transceiver to implement the method for quantificationally transceiving the non-character information independent of the external timer. The technology scenario is that: in the information transceiving method of asynchronous serial data line, the asynchronous serial transceiver transceives the character information, and also transceives non-character information. The asynchronous serial transceiver to implement the method includes: the character transceiver; the break controller connecting with the character transceiver; non-character recognizer; quantificational receiver. The asynchronous serial transceiver can directly transceive the non-character serial in this invention that lower system overhead and software complexity are achieved compared to the existing technologies.

Description

说 明 书  Description
异歩串行数据线信息收发方法及异歩串行收发器 技术领域  Heterogeneous serial data line information transmitting and receiving method and heterogeneous serial transceiver
本发明涉及数据通信领域, 特别涉及异歩串行数据收发技术。  The invention relates to the field of data communication, in particular to a heterogeneous serial data transceiving technology.
背景技术 Background technique
异歩串行数据信号线上的信息包括字符数据信息与非字符信息, 非字 符信息包括 Idle序列、 Break序列。 Idle序列是连续的逻辑 1, 表示接口 数据信号线空闲。 Break序列是大于等于一个字符长度 (含起始、 停止位) 的连续的逻辑 0, 作为带内控制信号。  The information on the different serial data signal line includes character data information and non-character information, and the non-character information includes an Idle sequence and a Break sequence. The Idle sequence is a continuous logic 1, indicating that the interface data signal line is idle. The Break sequence is a continuous logical 0 greater than or equal to one character length (including start and stop bits) as an in-band control signal.
已有的通用异歩收发器不能独立地定量接收和发送非字符信息序列。 如图 1所示, 通用异歩收发器 (UART) 包括字符收发器、 中断控制器, 接 收数据信号线 (RXD)与字符收发器的输入端相连, 字符收发器的输出端与发 送数据信号线 (TXD)相连, 字符收发器的控制端与中断控制器相连, 字符收 发器与中断控制器分别通过局部总线 (Localjms ) 与系统通信。  Existing universal isochronous transceivers are not capable of independently quantifying the receipt and transmission of non-character information sequences. As shown in Figure 1, the universal isochronous transceiver (UART) includes a character transceiver, an interrupt controller, a receive data signal line (RXD) connected to the input of the character transceiver, an output terminal of the character transceiver and a transmit data signal line. (TXD) is connected, the control end of the character transceiver is connected to the interrupt controller, and the character transceiver and the interrupt controller communicate with the system through the local bus (Localjms), respectively.
具体地说, 通用异歩收发器接收 Idle序列不直接产生任何接收动作, 应用系统只能将无接收信息间接判断为收到 Idle序列; 通过停止发送的方 法来间接发送 Idle序列。 通用异歩收发器只能在接收 Break序列的起点和 终点产生报告信息; 控制发送 Break序列的起点和终点。  Specifically, the universal isochronous transceiver receives the Idle sequence without directly generating any receiving action, and the application system can only indirectly determine that the unreceived information is the received Idle sequence; and indirectly sends the Idle sequence by stopping the sending method. The universal isochronous transceiver can only generate report information at the beginning and end of the receive Break sequence; control the start and end of the send Break sequence.
而一些通信协议需要直接地定量接收和发送 Idle及 Break序列, 采用 通用异歩收发器实现这类通信协议需要配置外部定时器, 在控制软件的配 合下, 间接地接收和发送 Idle及 Break序列。  Some communication protocols need to directly receive and transmit Idle and Break sequences. The implementation of such communication protocols by using a universal isochronous transceiver requires an external timer. Under the control software, the Idle and Break sequences are received and sent indirectly.
目前使用外部定时器解决异歩串行数据通信中接收和发送 Idle序列及 Break序列需要较大的系统开销, 大幅度增加软件的复杂度, 在控制多个异 歩串口时会严重降低系统的性能。  At present, the use of external timers to solve the problem of receiving and transmitting Idle sequences and Break sequences in heterogeneous serial data communication requires a large system overhead, greatly increasing the complexity of the software, and seriously degrading the performance of the system when controlling multiple heterogeneous serial ports. .
发明内容 Summary of the invention
本发明要解决的技术问题是:提供一种不依赖外部定时器, 能定量收发 非字符信息的方法及实现该方法的异歩串行收发器。  The technical problem to be solved by the present invention is to provide a method for quantitatively transmitting and receiving non-character information without relying on an external timer and an isochronous serial transceiver implementing the method.
本发明为解决上述技术问题所采用的技术方案是: 提供一种异歩串行 数据线信息收发方法, 异歩串行收发器通过异歩串行数据线收发字符数据 信息, 其特征在于, 还包括收发非字符信息的歩骤: a、 异歩串行收发器从异歩串行数据线接收非字符信息时, 识别非字符 信息的序列类型并统计非字符信息的序列长度, 定量接收非字符信息, 并 向系统报告收到非字符信息事件; The technical solution adopted by the present invention to solve the above technical problem is: providing a method for transmitting and receiving information of a different serial data line, wherein the heterogeneous serial transceiver transmits and receives character data information through a different serial data line, and is characterized in that Including the steps to send and receive non-character information: a. When the heterogeneous serial transceiver receives non-character information from the different serial data lines, it identifies the sequence type of the non-character information and counts the sequence length of the non-character information, quantitatively receives the non-character information, and reports the received non-character to the system. Character information event;
b、 异歩串行收发器向异歩串行数据线发送非字符信息时, 根据从系统 收到的发送非字符信息事件, 定量发送非字符信息。  b. When the heterogeneous serial transceiver sends non-character information to the different serial data line, the non-character information is quantitatively transmitted according to the non-character information event received from the system.
非字符信息为 Idle序列或 Break序列。  Non-character information is an Idle sequence or a Break sequence.
具体的, 歩骤 a所述定量接收非字符信息, 对于接收 Idle序列时具体 为: 预先设定 Idle序列最小值、 Idle序列分段报告长度、 Idle序列最大 值; 所述 Idle序列最大值〉 Idle序列分段报告长度〉 Idle序列最小值; 分类处理过程如下:  Specifically, the quantitative receiving non-character information is as follows: when receiving the Idle sequence, the following is: pre-setting the Idle sequence minimum value, the Idle sequence segment report length, and the Idle sequence maximum value; the Idle sequence maximum value> Idle Sequence segmentation report length> Idle sequence minimum; classification process is as follows:
( 1 ) 如待接收的 Idle序列长度 Idle序列最小值, 异歩串行收发器 统计完该 Idle序列长度后, 异歩串行收发器忽略该 Idle序列, 不向系统 报告收到 Idle序列事件;  (1) If the Idle sequence length of the Idle sequence to be received is the minimum value, after the isochronous serial transceiver counts the length of the Idle sequence, the isochronous serial transceiver ignores the Idle sequence and does not report to the system that the Idle sequence event is received;
( 2 )如 Idle序列最小值 <待接收的 Idle序列长度 Idle序列分段报 告长度, 异歩串行收发器定量接收的 Idle序列长度等于统计的 Idle序列 长度, 并向系统报告收到 Idle序列事件;  (2) If the Idle sequence minimum value <Idle sequence length Idle sequence segmentation report length to be received, the Idle sequence length of the heterogeneous serial transceiver is equal to the statistical Idle sequence length, and reports the received Idle sequence event to the system. ;
( 3 )如 Idle序列分段报告长度 <待接收的 Idle序列长度< 1(116序列 最大值, 每当统计的 Idle序列长度等于 Idle序列分段报告长度时, 异歩 串行收发器就向系统报告一次收到 Idle序列事件并清零重新分段统计 Idle 序列长度, 直至到本 Idle序列的终点, 最后一次向系统报告收到 Idle序 列事件; 除最后一次报告收到 Idle序列事件外, 异歩串行收发器定量接收 的 Idle序列长度等于 Idle序列分段报告长度; 最后一次报告收到 Idle序 列事件中, 异歩串行收发器定量接收的 Idle序列长度等于最后一次分段统 计的 Idle序列长度; (3) If the Idle sequence segment report length <the length of the Idle sequence to be received < 1 (11 6 sequence maximum, whenever the length of the Idle sequence is equal to the length of the Idle sequence segment report, the isochronous serial transceiver will The system reports that the Idle sequence event is received once and the re-segmentation statistics Idle sequence length is cleared until the end of the Idle sequence, and the Idle sequence event is reported to the system for the last time; except for the last report receiving the Idle sequence event, The serial length of the Idle sequence received by the serial transceiver is equal to the length of the Idle sequence segment report; the last time the Idle sequence event is received, the Idle sequence length of the heterogeneous serial transceiver is equal to the Idle sequence of the last segmentation statistics. length;
( 4)如 Idle序列最大值 待接收的 Idle序列长度时,每当统计的 Idle 序列长度等于 Idle序列分段报告长度时, 异歩串行收发器就向系统报告一 次收到 Idle序列事件并清零重新分段统计 Idle序列长度,直至累计的 Idle 序列长度等于 Idle序列最大值时, 异歩串行收发器停止统计并最后一次向 系统报告收到 Idle序列事件; 除最后一次报告收到 Idle序列事件外, 异 歩串行收发器定量接收的 Idle序列长度等于 Idle序列分段报告长度; 最 后一次报告收到 Idle序列事件中, 异歩串行收发器定量接收的 Idle序列 长度等于累计到 Idle序列最大值时, 最后一次分段统计的 Idle序列长度; 所述待接收的 Idle序列是指异歩串行数据线上连续的一段 Idle序列。 具体的, 歩骤 b所述定量发送非字符信息, 对于发送 Idle序列时具体 为: 预先设定待发送的 Idle序列长度; (4) If the Idle sequence maximum value is to be received by the Idle sequence length, whenever the statistical Idle sequence length is equal to the Idle sequence segment report length, the heterogeneous serial transceiver reports to the system that the Idle sequence event is received and cleared. Zero re-segmentation statistics Idle sequence length, until the accumulated Idle sequence length is equal to the Idle sequence maximum, the heterogeneous serial transceiver stops counting and reports to the system the Idle sequence event is received last time; except the last report receives the Idle sequence In addition to the event, the length of the Idle sequence received by the heterogeneous serial transceiver is equal to the length of the Idle sequence segment report; the last time the Idle sequence event is received, the isochronous serial transceiver quantizes the received Idle sequence. The length of the Idle sequence is the length of the last segmentation when the length is equal to the maximum value of the Idle sequence; the Idle sequence to be received refers to a continuous Idle sequence on the isochronous serial data line. Specifically, the non-character information is sent in the step b, and when the Idle sequence is sent, the following is: pre-setting the length of the Idle sequence to be sent;
当异歩串行收发器发送完待发送的 Idle序列, 且根据系统发送事件队 列顺序已有其它字符信息或非字符信息序列需要发送, 则异歩串行收发器 根据系统发送事件队列顺序发送已有待发送的内容;  When the isochronous serial transceiver sends the Idle sequence to be sent, and other character information or non-character information sequence needs to be sent according to the system sending event queue order, the isochronous serial transceiver sends the sequence according to the system sending event queue. Content to be sent;
当异歩串行收发器发送完待发送的 Idle序列, 且异歩串行收发器无任 何内容需要发送, 则继续发送 Idle序列直到收到系统发送事件。  When the isochronous serial transceiver sends the Idle sequence to be transmitted, and the isochronous serial transceiver does not have any content to transmit, the Idle sequence continues to be transmitted until the system sends an event.
具体的, 歩骤 a所述定量接收非字符信息, 对于接收 Break序列时具 体为: 预先设定 Break序列最大值、 Break序列分段报告长度, 所述 Break 序列最大值〉 Break序列分段报告长度;  Specifically, the quantitative receiving non-character information is as follows: when receiving the Break sequence, the following is: pre-setting a Break sequence maximum value, a Break sequence segment report length, and the Break sequence maximum value > Break sequence segment report length ;
( 1 ) 当待接收的 Break序列长度等于一个字符的长度, 异歩串行数据 收发器向系统报告收到 Break序列事件, 进入歩骤 (2 ) ;  (1) When the length of the Break sequence to be received is equal to the length of one character, the heterogeneous serial data transceiver reports to the system that the Break sequence event is received, and proceeds to step (2);
( 2 ) 如待接收的 Break序列长度 Break序列分段报告长度, 异歩串 行收发器统计完该 Idle序列长度后, 立即向系统报告收到 Break序列和 Break序列终止事件;异歩串行收发器定量接收的 Break序列长度等于统计 的 Break序列长度;  (2) If the length of the Break sequence length of the Break sequence to be received is the length of the segment sequence report, the isochronous serial transceiver reports the receipt of the Break sequence and the Break sequence termination event to the system immediately after counting the length of the Idle sequence; The length of the Break sequence received by the device is equal to the length of the statistical Break sequence;
( 3 ) 如 Break序列分段报告长度 <待接收的 Break序列长度<81^&1^ 序列最大值, 每当统计的 Break序列长度等于 Break序列分段报告长度时, 异歩串行收发器就向系统报告一次收到 Break序列事件并清零重新分段统 计 Break序列长度, 直至到本 Break序列的终点, 最后一次向系统报告收 到 Break序列事件和 Break序列终止事件; 除最后一次报告收到 Break序 列事件外, 异歩串行收发器定量接收的 Break序列长度等于 Break序列分 段报告长度; 最后一次报告收到 Break序列事件中, 异歩串行收发器定量 接收的 Break序列长度等于最后一次分段统计的 Break序列长度;  (3) If the Break sequence segment report length <the length of the Break sequence to be received <81^&1^ sequence maximum, whenever the length of the statistical Break sequence is equal to the length of the Break sequence segment report, the isochronous serial transceiver will The system reports that the Break sequence event is received once and the resegmentation statistics Break sequence length is cleared until the end of the Break sequence, and the last time the report receives the Break sequence event and the Break sequence termination event; except for the last report received Break In addition to the sequence event, the length of the Break sequence received by the heterogeneous serial transceiver is equal to the length of the Break sequence segment report; the last time the report receives the Break sequence event, the length of the Break sequence received by the heterogeneous serial transceiver is equal to the last time. The length of the Break sequence of the segment statistics;
( 4) 如待接收的 Break序列 ^Break序列最大值; 每当统计的 Break 序列长度等于 Break序列分段报告长度时, 异歩串行收发器就向系统报告 一次收到 Break序列事件并清零重新分段统计 Break序列长度, 直至累计 的 Break序列长度等于 Break序列最大值时, 异歩串行收发器停止统计并 最后一次向系统报告收到 Break序列事件, 直到该 Break序列终点才报告 Break序列终止事件; 除最后一次报告收到 Break序列事件外, 异歩串行收 发器定量接收的 Break序列长度等于 Break序列分段报告长度; 最后一次 报告收到 Break序列事件中异歩串行收发器定量接收的 Break序列长度等 于累计到 Break序列最大值时, 最后一次分段统计时的 Break序列长度; 所述待接收的 Break序列是指异歩串行数据线上连续的一段 Break序 列。 (4) If the Break sequence to be received is the maximum value of the Break sequence; whenever the length of the Break sequence is equal to the length of the Break sequence segment report, the isochronous serial transceiver reports to the system that the Break sequence event is received and cleared. Re-segmentation statistics the length of the Break sequence until the accumulated Break sequence length is equal to the maximum value of the Break sequence. The heterogeneous serial transceiver stops counting and reports to the system the last time the receipt of the Break sequence event is not reported until the end of the Break sequence. Break sequence termination event; except for the last report receipt of the Break sequence event, the length of the Break sequence received by the heterogeneous serial transceiver is equal to the length of the Break sequence segment report; the last report receives the sequence sequence event in the Break sequence event The length of the Break sequence received by the device is equal to the length of the Break sequence when the last segment statistics are accumulated to the maximum value of the Break sequence; the Break sequence to be received refers to a consecutive Break sequence on the different serial data lines.
具体的, 歩骤 b所述定量发送非字符信息, 对于发送 Break序列时具 体为: 预先设定待发送的 Break序列长度;  Specifically, the step b sends the non-character information quantitatively, and when the Break sequence is sent, the specific: the length of the Break sequence to be sent is preset;
当异歩串行收发器发送完待发送的 Break序列, 且根据系统发送事件 队列顺序已有其它字符信息或非字符信息序列需要发送, 则异歩串行收发 器根据系统发送事件队列顺序发送已有待发送的内容;  When the isochronous serial transceiver sends the Break sequence to be sent, and other character information or non-character information sequence needs to be sent according to the sequence of the event queue sent by the system, the isochronous serial transceiver sends the sequence according to the system sending event queue. Content to be sent;
当异歩串行收发器发送完待发送的 Break序列, 且异歩串行收发器无 任何内容需要发送, 则异歩串行收发器发送 Idle序列直到收到系统发送事 件。  When the isochronous serial transceiver sends the Break sequence to be sent, and the isochronous serial transceiver has nothing to send, the isochronous serial transceiver sends the Idle sequence until it receives the system to send the event.
本发明还提供了一种实现上述方法的异歩串行收发器, 包括字符收发 器、 中断控制器, 中断控制器与字符收发器相连, 还包括非字符信息识别 器、 定量接收单元; 非字符信息识别器的输入端、 字符收发器的输入端分 别与接收数据信号线相连; 非字符信息识别器与定量接收单元相连; 定量 接收单元的输出端连接中断控制器;  The invention also provides an isochronous serial transceiver implementing the above method, comprising a character transceiver, an interrupt controller, an interrupt controller connected to the character transceiver, a non-character information identifier, a quantitative receiving unit, and a non-character The input end of the information recognizer and the input end of the character transceiver are respectively connected to the receiving data signal line; the non-character information identifier is connected to the quantitative receiving unit; the output end of the quantitative receiving unit is connected to the interrupt controller;
所述非字符信息识别器用于识别非字符信息的序列类型;  The non-character information identifier is used to identify a sequence type of non-character information;
所述定量接收单元用于统计非字符信息的序列长度, 定量接收非字符 自  The quantitative receiving unit is configured to count the sequence length of the non-character information, and quantitatively receive the non-character from
具体的, 定量接收单元包括计数器、 接收比较器、 接收比较寄存器、 非字符信息控制器、 接收长度寄存器、 接收队列控制器; 非字符信息识别 器与计数器相连; 接收比较寄存器与接收比较器的一个输入端相连, 接收 比较器的另一个输入端与计数器相连; 非字符信息控制器分别与接收比较 器、 计数器、 非字符信息识别器相连; 非字符信息控制器的控制端与计数 器相连; 非字符信息控制器的输出端分别与接收长度寄存器与接收队列控 制器相连, 接收队列控制器的输出端连接中断控制器;  Specifically, the quantitative receiving unit includes a counter, a receiving comparator, a receiving comparison register, a non-character information controller, a receiving length register, and a receiving queue controller; the non-character information identifier is connected to the counter; and the receiving comparison register and the receiving comparator are The input terminal is connected, and the other input terminal of the receiving comparator is connected to the counter; the non-character information controller is respectively connected to the receiving comparator, the counter, and the non-character information identifier; the control end of the non-character information controller is connected to the counter; the non-character The output end of the information controller is respectively connected to the receiving length register and the receiving queue controller, and the output end of the receiving queue controller is connected to the interrupt controller;
所述计数器用于统计待接收的非字符信息的序列长度;  The counter is configured to count a sequence length of non-character information to be received;
所述接收比较寄存器用于存储预先设定的控制接收序列长度值; 所述接收比较器用于比较待接收的非字符信息的序列长度与控制接收 序列长度值, 将比较结果输出到非字符信息控制器; The receiving comparison register is configured to store a preset control receiving sequence length value; The receiving comparator is configured to compare a sequence length of the non-character information to be received and a control receiving sequence length value, and output the comparison result to the non-character information controller;
所述接收长度寄存器用于存储定量接收的非字符信息;  The receive length register is configured to store quantitatively received non-character information;
所述非字符信息控制器用于根据所述比较结果将定量接收的非字符信 息写入接收长度寄存器, 并向接收队列控制器报告接收到非字符信息事件; 所述接收队列控制器用于将来自于非字符信息控制器、 字符收发器的 报告事件组织成队列, 按序向中断控制器发出事件报告信号。  The non-character information controller is configured to write the quantitatively received non-character information into the receiving length register according to the comparison result, and report the receiving non-character information event to the receiving queue controller; the receiving queue controller is used to The report events of the non-character information controller and the character transceiver are organized into a queue, and an event report signal is sent to the interrupt controller in sequence.
具体的, 所述定量接收单元包括 Idle序列定量接收单元、 Break序列 定量接收单元, 所述接收比较寄存器保存的预先设定的控制接收序列长度 值包括: Idle序列最小值、 Idle序列分段报告长度、 Idle序列最大值。 所 述接收比较寄存器存储的预先设定的控制接收序列长度值还包括: Break序 列分段报告长度、 Break序列最大值。  Specifically, the quantitative receiving unit includes an Idle sequence quantitative receiving unit and a Break sequence quantitative receiving unit, and the preset control receiving sequence length value saved by the receiving comparing register includes: an Idle sequence minimum value, and an Idle sequence segment report length. , Idle sequence maximum. The preset control receiving sequence length value stored in the receiving comparison register further includes: a Break sequence segment report length, and a Break sequence maximum value.
进一歩的, 异歩串行收发器还包括定量发送单元, 定量发送单元输出 端连接发送数据信号线相连。  Further, the heterogeneous serial transceiver further includes a quantitative transmitting unit, and the output of the quantitative transmitting unit is connected to the transmitting data signal line.
定量发送单元包括发送队列控制器、 发送长度寄存器; 所述字符收发 器与发送队列控制器的一个输入端相连; 发送长度寄存器与发送队列控制 器的另一个输入端相连; 发送队列控制器的输出端连接发送数据信号线, 发送队列控制器还与中断控制器相连;  The quantitative transmitting unit includes a sending queue controller and a transmission length register; the character transceiver is connected to one input terminal of the transmission queue controller; the transmission length register is connected to another input terminal of the transmission queue controller; and the output of the transmission queue controller is The end connection sends a data signal line, and the sending queue controller is also connected to the interrupt controller;
所述发送长度寄存器用于保存已设定的待发送的非字符信息; 所述发送队列控制器用于将收到的发送事件组织成队列, 根据已设定 的待发送非字符信息序列长度, 按序向发送数据信号线发送。  The sending length register is configured to save the set non-character information to be sent; the sending queue controller is configured to organize the received sending event into a queue, according to the set length of the non-character information sequence to be sent, The sequence sends a data signal line to send.
定量发送单元包括 Idle序列定量发送单元、 Break序列定量发送单元, 所述发送长度寄存器保存的已设定的待发送的非字符信息包括 Idle序列、 Break序歹 1」。  The quantitative transmitting unit includes an Idle sequence quantitative transmitting unit and a Break sequence quantitative transmitting unit, and the set non-character information to be sent stored in the sending length register includes an Idle sequence and a Break sequence 歹 1”.
本发明的有益效果是, 异歩串行收发器能直接地收发非字符信息序列, 其实现方法相比现有方法相比有效减小系统开销, 降低软件的复杂度。 附图说明  The invention has the beneficial effects that the heterogeneous serial transceiver can directly transmit and receive non-character information sequences, and the implementation method thereof can effectively reduce the system overhead and reduce the software complexity compared with the existing methods. DRAWINGS
图 1为通用异歩收发器示意图;  Figure 1 is a schematic diagram of a general-purpose heterotransistor;
图 2为本发明异歩串行收发器示意图;  2 is a schematic diagram of an isochronous serial transceiver of the present invention;
图 3为本发明异歩串行收发器的实施例逻辑电路框图。  3 is a block diagram of a logic circuit of an embodiment of an isochronous serial transceiver of the present invention.
具体实施方式 为了能定量收发非字符信息, 本发明在通用异歩收发器 (包括字符收 发器、 中断控制器) 的基础上增加了非字符信息识别器、 定量接收单元、 定量发送单元。 如图 2所示, 非字符信息识别器的输入端、 字符收发器的 输入端分别与接收数据信号线相连; 非字符信息识别器与定量接收单元相 连; 定量接收单元、 定量发送单元分别连接中断控制器。 detailed description In order to quantitatively transmit and receive non-character information, the present invention adds a non-character information identifier, a quantitative receiving unit, and a quantitative transmitting unit to the general-purpose heterogeneous transceiver (including the character transceiver and the interrupt controller). As shown in FIG. 2, the input end of the non-character information identifier and the input end of the character transceiver are respectively connected to the receiving data signal line; the non-character information identifier is connected to the quantitative receiving unit; the quantitative receiving unit and the quantitative transmitting unit are respectively disconnected. Controller.
非字符信息识别器用于识别非字符信息的序列类型;  A non-character information recognizer is used to identify a sequence type of non-character information;
定量接收单元用于统计非字符信息序列的序列长度;  The quantitative receiving unit is configured to count the sequence length of the non-character information sequence;
定量接收单元包括计数器、 接收比较器、 接收比较寄存器、 非字符信 息控制器、 接收长度寄存器、 接收队列控制器; 非字符信息识别器与计数 器相连; 计数器用于统计非字符信息识别器识别出的非字符信息序列 (待 接收的非字符信息) 的序列长度; 接收比较寄存器与接收比较器的一个输 入端相连, 接收比较器的另一个输入端与计数器相连; 非字符信息控制器 分别与接收比较器、 计数器、 非字符信息识别器相连; 非字符信息控制器 的控制端与计数器相连;  The quantitative receiving unit comprises a counter, a receiving comparator, a receiving comparison register, a non-character information controller, a receiving length register, and a receiving queue controller; the non-character information identifier is connected to the counter; and the counter is used for counting the non-character information identifier recognized by the identifier The sequence length of the non-character information sequence (non-character information to be received); the receive compare register is connected to one input of the receive comparator, and the other input of the receive comparator is connected to the counter; the non-character information controller is compared with the receive The counter, the non-character information identifier is connected; the control end of the non-character information controller is connected to the counter;
其中接收比较器、 接收比较寄存器、 非字符信息控制器用于定量接收 非字符信息序列。  The receive comparator, the receive compare register, and the non-character information controller are used to quantitatively receive the non-character information sequence.
非字符信息识别器与计数器相连。 非字符信息识别器输出一路信号到 非字符信息控制器告知其已收到非字符信息; 接收比较器一方面接收计数 器统计出的非字符信息序列的序列长度, 另一方面将接收比较寄存器中设 定的长度值与计数器统计出的非字符信息序列的序列长度作比较, 将比较 结果送到非字符信息控制器, 该比较结果用于控制非字符信息控制器从计 数器直接获得的非字符信息序列的序列长度做出定量接收的处理, 即控制 非字符信息控制器将定量接收的非字符信息写入接收长度寄存器并向接收 队列控制器报告收到非字符信息序列事件; 字符收发器、 非字符信息控制 器的输出端与接收队列控制器相连, 接收队列控制器将来自于非字符信息 控制器、 字符收发器的报告事件组织成队列, 按序向中断控制器发出事件 报告信号。  The non-character information recognizer is connected to the counter. The non-character information recognizer outputs a signal to the non-character information controller to inform that it has received the non-character information; the receiving comparator receives the sequence length of the non-character information sequence counted by the counter on the one hand, and receives the comparison register in the other hand on the other hand. The determined length value is compared with the sequence length of the non-character information sequence counted by the counter, and the comparison result is sent to the non-character information controller, and the comparison result is used to control the non-character information sequence directly obtained by the non-character information controller from the counter. The sequence length is subjected to quantitative reception processing, that is, the control non-character information controller writes the quantitatively received non-character information into the reception length register and reports to the reception queue controller that the non-character information sequence event is received; the character transceiver, the non-character The output of the information controller is connected to the receiving queue controller, and the receiving queue controller organizes the reporting events from the non-character information controller and the character transceiver into a queue, and sequentially issues an event reporting signal to the interrupt controller.
定量发送单元包括发送队列控制器、 发送长度寄存器; 字符收发器与 发送队列控制器的一个输入端相连, 发送长度寄存器保存有预先设定的非 字符信息发送比较值; 发送长度寄存器与发送队列控制器的另一个输入端 相连; 发送队列控制器的输出端连接发送数据信号线; 发送队列控制器根 据已设定的待发送非字符信息序列长度, 控制对当前非字符信息序列的发 送状态, 定量按序向发送数据信号线发送异歩串行数据, 从而达到定量发 送的目的。 The quantitative sending unit comprises a sending queue controller and a sending length register; the character transceiver is connected to an input end of the sending queue controller, and the sending length register stores a preset non-character information sending comparison value; the sending length register and the sending queue control The other input of the device is connected; the output of the transmit queue controller is connected to send the data signal line; the send queue controller root According to the set length of the non-character information sequence to be sent, the transmission state of the current non-character information sequence is controlled, and the heterogeneous serial data is sent to the transmission data signal line in a quantitative manner, thereby achieving the purpose of quantitative transmission.
当然, 不设置定量发送单元也能实现定量收发非字符信息。 定量接收 单元向按序向中断控制器发出事件报告信号后, 由系统发送异歩串行数据。  Of course, the non-character information can be quantitatively transmitted and received without setting the quantitative transmitting unit. After the quantitative receiving unit sends an event reporting signal to the interrupt controller in sequence, the system sends the isochronous serial data.
实施例  Example
以本发明定量收发 Idle序列与 Break序列的异歩串行收发器为例, 定 量接收单元包括 Idle序列定量接收单元、 Break序列定量接收单元; 定量 发送单元包括 Idle序列定量发送单元、 Break序列定量发送单元。 字符数 据长度以字节为单位; 因为 Idle序列和 Break序列都是重复的码元序列, 所以 Idle序列和 Break序列长度以码元为单位。  Taking the heterogeneous serial transceiver of the Idle sequence and the Break sequence of the present invention as an example, the quantitative receiving unit includes an Idle sequence quantitative receiving unit and a Break sequence quantitative receiving unit; the quantitative transmitting unit includes an Idle sequence quantitative transmitting unit, and a Break sequence quantitative transmitting unit. unit. The length of the character data is in bytes; since both the Idle sequence and the Break sequence are repeated symbol sequences, the length of the Idle sequence and the Break sequence are in units of symbols.
对于 Idle序列, 定量收发是限定异歩串行收发器从异歩串行数据线接 收 Idle序列以及向异歩串行数据线发送 Idle序列的长度的最大值与最小 值; 对于 Break序列为限定异歩串行收发器从异歩串行数据线接收 Break 序列以及向异歩串行数据线发送 Break序列的长度的最大值。  For the Idle sequence, the quantitative transceiver is the maximum and minimum lengths that limit the length of the Idle sequence received by the isoband serial transceiver from the isochronous serial data line and the Idle sequence to the isochronous serial data line; The serial transceiver receives the Break sequence from the different serial data lines and the maximum length of the Break sequence transmitted to the different serial data lines.
要实现 Idle序列定量接收和发送需要下列 5个寄存器和 2个计数器: To implement the Idle sequence quantitative reception and transmission, the following 5 registers and 2 counters are required:
1 ) Idle序列最小值寄存器: 读写寄存器, 是接收比较寄存器之一, 用 于由系统设置期望删除的 Idle序列碎片的最大长度数值, 即接收 Idle序 列的长度最小值, 避免接收 Idle序列碎片; 1) Idle sequence minimum register: A read/write register, which is one of the receive compare registers, used to set the maximum length of the Idle sequence fragment desired to be deleted by the system, that is, the minimum length of the received Idle sequence, to avoid receiving Idle sequence fragments;
2 ) Idle序列最大值寄存器: 读写寄存器, 是接收比较寄存器之一, 用 于对一个长的 Idle序列, 由系统设置期望的限制长度数值, 即接收 Idle 序列的长度最大值, 限制接收长度;  2) Idle sequence maximum register: A read/write register, which is one of the receive compare registers, is used to set a desired limit length value for a long Idle sequence, that is, the maximum length of the received Idle sequence, and the receive length is limited;
3 ) Idle序列分段报告寄存器: 读写寄存器, 是接收比较寄存器之一, 用于在接收 Idle序列限制寄存器设置值较大时, 由系统设置期望的报告间 隔长度数值, 本发明收发器分段向系统报告收到 Idle序列事件, 改善报告 的实时性;  3) Idle sequence segment report register: read/write register, which is one of the receive compare registers, used to set the desired report interval length value by the system when the received Idle sequence limit register setting value is large, the transceiver segment of the present invention Reporting Idle sequence events to the system to improve the real-time performance of the report;
4) 接收 Idle序列长度寄存器: 只读寄存器, 用于所述收发器向系统 报告收到 Idle序列事件时, 装入接收到的定量 Idle序列长度值;  4) receiving the Idle sequence length register: a read-only register, configured to load the received quantitative Idle sequence length value when the transceiver reports to the system that the Idle sequence event is received;
5 ) Idle序列报告计数器: 内部计数器, 用于统计上次报告收到 Idle 序列事件之后新接收到的 Idle序列长度; 收发器报告收到 Idle序列事件 时将接收 Idle序列报告计数器的计数值装入接收 Idle序列长度寄存器, 清零接收 Idle序列报告计数器, 重新开始计数; 5) Idle sequence report counter: internal counter, used to count the length of the newly received Idle sequence after the last Idle sequence event is received. The transceiver reports that the count value of the Idle sequence report counter is loaded when the Idle sequence event is received. Receive the Idle sequence length register, Clear the receiving Idle sequence report counter and restart counting;
6 ) Idle序列累加计数器: 内部计数器, 用于从 Idle序列起点累计连 续 Idle序列的长度;  6) Idle sequence accumulation counter: an internal counter for accumulating the length of the continuous Idle sequence from the start of the Idle sequence;
7 ) Idle序列发送长度寄存器: 读写寄存器, 用于由系统设置要发送的 Idle序列长度数值, 控制异歩串行收发器发送 Idle序列的长度。  7) Idle sequence transmission length register: A read/write register, used to set the length of the Idle sequence length to be sent by the system, and control the length of the Idle sequence sent by the heterogeneous serial transceiver.
要实现 Break序列的定量接收和发送部件需要下列 4个寄存器和 2个 计数器:  To implement the quantitative receive and transmit component of the Break sequence, the following four registers and two counters are required:
1 ) Break序列最大值寄存器: 读写寄存器, 是接收比较寄存器之一, 用于对一个长的 Break序列, 由系统设置期望的限制接收长度数值, 即接 收 Break序列的长度最大值, 限制接收长度;  1) Break sequence maximum register: A read/write register, which is one of the receive compare registers, is used to set a desired limit length value for a long Break sequence, which is the maximum length of the receive Break sequence, and limits the receive length. ;
2 ) Break序列分段报告寄存器: 读写寄存器, 是接收比较寄存器之一, 用于在接收 Break序列限制寄存器设置值较大时, 由系统设置期望的报告 间隔长度数值; 异歩串行收发器分段向系统报告收到 Break序列事件, 保 证报告的实时性;  2) Break sequence segment report register: A read/write register, which is one of the receive compare registers, which is used to set the desired report interval length value when the Receive Break sequence limit register is set to a large value; The segment reports to the system the receipt of the Break sequence event to ensure the real-time nature of the report;
3 )接收 Break序列寄存器: 只读寄存器, 是接收比较寄存器之一, 用 于异歩串行收发器向系统报告收到 Break序列事件时, 装入接收到的定量 Break序列长度值;  3) Receive Break Sequence Register: A read-only register, which is one of the receive compare registers, is used to report the received Break sequence event to the system when the heterogeneous serial transceiver reports the received Break sequence event, and loads the received quantitative Break sequence length value;
4) Break序列报告计数器: 内部计数器,用于统计上次报告收到 Break 序列事件之后新接收到的 Break序列长度;异歩串行收发器报告收到 Break 序列事件时将接收 Break序列报告计数器的计数值装入接收 Break序列寄 存器, 清零接收 Break序列报告计数器, 重新开始计数;  4) Break sequence report counter: The internal counter is used to count the length of the newly received Break sequence after the last report receives the Break sequence event; the isochronous serial transceiver reports that it will receive the Break sequence report counter when it receives the Break sequence event. The count value is loaded into the receive Break sequence register, cleared to receive the Break sequence report counter, and restarts counting;
5 ) Break序列长度累加计数器: 内部计数器, 用于累计连续 Break序 列的长度;  5) Break sequence length accumulation counter: internal counter, used to accumulate the length of the continuous break sequence;
6 ) Break序列发送长度寄存器: 读写寄存器, 用于由系统写入要发送 的 Break序列长度值, 控制所述异歩串行收发器发送 Break序列的长度。  6) Break sequence transmission length register: A read/write register for writing the length of the Break sequence to be sent by the system, and controlling the length of the Break sequence sent by the heterogeneous serial transceiver.
字符数据、 Break序列和 Idle序列在异歩串行接口数据信号线上是先 后串行出现的, 本发明用接收事件队列来表达发生的收到字符、 Break序列 和 Idle序列事件之间的时间顺序,用发送事件队列来表达需要发送的字符、 Break序列和 Idle序列的时间顺序。  The character data, the Break sequence and the Idle sequence appear serially on the data line of the different serial interface. The present invention uses the receive event queue to express the time sequence between the received character, the Break sequence and the Idle sequence event. Use the send event queue to express the chronological order of the characters, break sequences, and Idle sequences that need to be sent.
异歩串行收发器定量接收 Idle序列具体包括如下处理过程:  The heterogeneous serial transceiver quantitative receiving Idle sequence specifically includes the following processing:
预先设定 Idle序列最小值、 Idle序列分段报告长度、 Idle序列最大 值; 将设定的 Idle序列最小值保存于 Idle序列最小值寄存器、 Idle序列 分段值保存于 Idle序列分段报告寄存器、 Idle序列最大值保存于 Idle序 列最大值寄存器中;所述 Idle序列最大值〉 Idle序列分段报告长度〉 Idle 序列最小值; 待接收的 Idle序列是指异歩串行数据线上连续的一段 Idle 序列; Preset Idle sequence minimum, Idle sequence segmentation report length, Idle sequence maximum The value of the set Idle sequence is stored in the Idle sequence minimum value register, the Idle sequence segment value is stored in the Idle sequence segment report register, and the Idle sequence maximum value is stored in the Idle sequence maximum value register; Value > Idle sequence segment report length > Idle sequence minimum; The Idle sequence to be received refers to a continuous Idle sequence on the isochronous serial data line;
( 1 ) 如待接收的 Idle序列长度 Idle序列最小值, 异歩串行收发器 统计完该 Idle序列长度后, 异歩串行收发器忽略该 Idle序列; 不向系统 报告收到 Idle序列事件;  (1) If the Idle sequence length of the Idle sequence to be received is the minimum value, after the isochronous serial transceiver counts the length of the Idle sequence, the isochronous serial transceiver ignores the Idle sequence; does not report the receipt of the Idle sequence event to the system;
(2)如 Idle序列最小值 <待接收的 Idle序列长度 Idle序列分段报 告长度, 异歩串行收发器定量接收的 Idle序列长度等于统计的 Idle序列 长度, 并向系统报告收到 Idle序列事件;  (2) If the Idle sequence minimum value <Idle sequence length Idle sequence segmentation report length to be received, the Idle sequence length of the heterogeneous serial transceiver is equal to the statistical Idle sequence length, and reports the received Idle sequence event to the system. ;
(3)如 Idle序列分段报告长度 <待接收的 Idle序列长度< 1(116序列 最大值, 每当统计的 Idle序列长度等于 Idle序列分段报告长度时, 异歩 串行收发器就向系统报告一次收到 Idle序列事件并清零重新分段统计 Idle 序列长度, 对于分为多段多次报告的 Idle序列, 累计的 Idle序列长度不 清零, 从 Idle序列起点继续累计本 Idle序列长度, 直至到本 Idle序列的 终点, 最后一次向系统报告收到 Idle序列事件; 除最后一次报告收到 Idle 序列事件外, 异歩串行收发器定量接收的 Idle序列长度等于 Idle序列分 段报告长度; 最后一次报告收到 Idle序列事件中, 异歩串行收发器定量接 收的 Idle序列长度等于最后一次统计的 Idle序列长度; (3) If the Idle sequence segment report length <the length of the Idle sequence to be received < 1 (11 6 sequence maximum, whenever the length of the Idle sequence is equal to the length of the Idle sequence segment report, the isochronous serial transceiver will The system reports that the Idle sequence event is received once and the re-segmentation statistics Idle sequence length is cleared. For the Idle sequence divided into multiple segments, the accumulated Idle sequence length is not cleared, and the Idle sequence length is continuously accumulated from the Idle sequence start point. Until the end of the Idle sequence, the last time the system receives the Idle sequence event; except for the last time the Idle sequence event is received, the Idle sequence length of the heterogeneous serial transceiver is equal to the Idle sequence segment report length; In the last report received Idle sequence event, the length of the Idle sequence received by the heterogeneous serial transceiver is equal to the length of the Idle sequence of the last statistics;
(4)如 Idle序列最大值 待接收的 Idle序列长度时,每当统计的 Idle 序列长度等于 Idle序列分段报告长度时, 异歩串行收发器就向系统报告一 次收到 Idle序列事件并清零重新分段统计本 Idle序列长度, 对于分为多 段多次报告的 Idle序列, 累计的 Idle序列长度为不清零, 从 Idle序列起 点继续累计本 Idle序列长度, 直至累计的 Idle序列长度等于 Idle序列最 大值时, 异歩串行收发器停止统计并最后一次向系统报告收到 Idle序列事 件,之后异歩串行收发器不再报告收到限长 Idle序列事件,直到下一个 Idle 序列起点才重新计数; 除最后一次报告收到 Idle序列事件外, 异歩串行收 发器定量接收的 Idle序列长度等于 Idle序列分段报告长度; 最后一次报 告收到 Idle序列事件中, 异歩串行收发器定量接收的 Idle序列长度等于 累计到 Idle序列最大值时最后一次分段统计的 Idle序列长度。 异歩串行收发器定量接收 Break序列具体包括如下处理过程: 预先设 定 Break序列最大值、 Break序列分段报告长度, 将设定的 Break序列分段 报告长度保存于 Break 序列分段报告寄存器, Break 序列最大值保存于 Break序列最大值寄存器中, 所述 Break序列最大值〉 Break序列分段报告 长度; 待接收的 Break序列是指异歩串行数据线上连续的一段 Break序列;(4) If the Idle sequence maximum value is to be received by the Idle sequence length, whenever the statistical Idle sequence length is equal to the Idle sequence segment report length, the heterogeneous serial transceiver reports to the system that the Idle sequence event is received and cleared. Zero re-segmentation statistics The length of the Idle sequence. For the Idle sequence divided into multiple segments, the accumulated Idle sequence length is unclear, and the length of the Idle sequence is continued from the start of the Idle sequence until the accumulated Idle sequence length is equal to Idle. When the sequence is at the maximum, the isochronous serial transceiver stops counting and reports to the system the last time the Idle sequence event is received. After that, the isochronous serial transceiver no longer reports the receipt of the long-length Idle sequence event until the start of the next Idle sequence. Recounting; except for the last report receiving the Idle sequence event, the Idle sequence length of the heterogeneous serial transceiver is equal to the length of the Idle sequence segment report; the last time the Idle sequence event is received, the isochronous serial transceiver The length of the Idle sequence that is quantitatively received is equal to the length of the Idle sequence of the last segmentation count when the maximum value of the Idle sequence is accumulated. The heterogeneous serial transceiver quantitatively receives the Break sequence specifically includes the following processes: pre-setting the Break sequence maximum value, the Break sequence segment report length, and storing the set Break sequence segment report length in the Break sequence segment report register. The maximum value of the Break sequence is stored in the Maximum sequence register of the Break sequence, and the maximum value of the Break sequence is > the length of the Break sequence segment report; the Break sequence to be received refers to a consecutive Break sequence of the different serial data lines;
( 1 ) 当待接收的 Break序列长度等于一个字符的长度, 异歩串行数据 收发器向系统报告收到 Break序列事件, 进入歩骤 (2 ) ; (1) When the length of the Break sequence to be received is equal to the length of one character, the heterogeneous serial data transceiver reports to the system that the Break sequence event is received, and proceeds to step (2);
( 2 ) 如待接收的 Break序列长度 Break序列分段报告长度, 异歩串 行收发器统计完该 Idle序列长度后, 立即向系统报告收到 Break序列和 Break序列终止事件;异歩串行收发器定量接收的 Break序列长度等于统计 的 Break序列长度;  (2) If the length of the Break sequence length of the Break sequence to be received is the length of the segment sequence report, the isochronous serial transceiver reports the receipt of the Break sequence and the Break sequence termination event to the system immediately after counting the length of the Idle sequence; The length of the Break sequence received by the device is equal to the length of the statistical Break sequence;
( 3 ) 如 Break序列分段报告长度 <待接收的 Break序列长度<81^&1^ 序列最大值, 每当统计的 Break序列长度等于 Break序列分段报告长度时, 异歩串行收发器就向系统报告一次收到 Break序列事件并清零重新分段统 计 Break序列长度, 直至到本 Break序列的终点, 最后一次向系统报告收 到 Break序列事件和 Break序列终止事件; 除最后一次报告收到 Break序 列事件外, 异歩串行收发器定量接收的 Break序列长度等于 Break序列分 段报告长度; 最后一次报告收到 Break序列事件中, 异歩串行收发器定量 接收的 Break序列长度等于最后一次分段统计的 Break序列长度;  (3) If the Break sequence segment report length <the length of the Break sequence to be received <81^&1^ sequence maximum, whenever the length of the statistical Break sequence is equal to the length of the Break sequence segment report, the isochronous serial transceiver will The system reports that the Break sequence event is received once and the resegmentation statistics Break sequence length is cleared until the end of the Break sequence, and the last time the report receives the Break sequence event and the Break sequence termination event; except for the last report received Break In addition to the sequence event, the length of the Break sequence received by the heterogeneous serial transceiver is equal to the length of the Break sequence segment report; the last time the report receives the Break sequence event, the length of the Break sequence received by the heterogeneous serial transceiver is equal to the last time. The length of the Break sequence of the segment statistics;
( 4) 如待接收的 Break序列 ^Break序列最大值; 每当统计的 Break 序列长度等于 Break序列分段报告长度时, 异歩串行收发器就向系统报告 一次收到 Break序列事件并清零重新分段统计 Break序列长度, 直至累计 的 Break序列长度等于 Break序列最大值时, 异歩串行收发器停止统计并 最后一次向系统报告收到 Break序列事件, 直到该 Break序列终点才报告 Break序列终止事件; 除最后一次报告收到 Break序列事件外, 异歩串行收 发器定量接收的 Break序列长度等于 Break序列分段报告长度; 最后一次 报告收到 Break序列事件中, 异歩串行收发器定量接收的 Break序列长度 等于累计到 Break序列最大值时, 最后一次分段统计的 Break序列长度。  (4) If the Break sequence to be received is the maximum value of the Break sequence; whenever the length of the Break sequence is equal to the length of the Break sequence segment report, the isochronous serial transceiver reports to the system that the Break sequence event is received and cleared. Re-segmentation statistics Break sequence length, until the accumulated Break sequence length is equal to the Break sequence maximum, the heterogeneous serial transceiver stops counting and reports to the system the last received Break sequence event until the Break sequence end point reports the Break sequence Termination event; except for the last report receipt of the Break sequence event, the length of the Break sequence received by the heterogeneous serial transceiver is equal to the length of the Break sequence segment report; the last report received the Break sequence event, the different serial transceiver The length of the quantitatively received Break sequence is equal to the length of the Break sequence of the last segmentation statistics when the maximum value of the Break sequence is accumulated.
异歩串行收发器定量发送 Idle序列, 包括如下歩骤: 根据发送长度寄 存器中已预先设定的待发送的 Idle序列长度;  The isochronous serial transceiver quantitatively transmits the Idle sequence, and includes the following steps: according to the length of the Idle sequence to be sent preset in the transmission length register;
当异歩串行收发器发送完待发送的 Idle序列, 且根据系统发送事件队 列顺序已有其它字符信息或非字符信息序列需要发送, 则异歩串行收发器 根据系统发送事件队列顺序发送已有待发送的内容; When the isochronous serial transceiver sends the Idle sequence to be sent, and sends the event team according to the system. If the column order has other character information or non-character information sequences to be sent, the heterogeneous serial transceiver sends the content to be sent according to the sequence of the event queue sent by the system;
当异歩串行收发器发送完待发送的 Idle序列, 且异歩串行收发器无任 何内容需要发送, 则继续发送 Idle序列直到收到系统发送事件。  When the isochronous serial transceiver sends the Idle sequence to be transmitted, and the isochronous serial transceiver does not have any content to transmit, the Idle sequence continues to be transmitted until the system sends an event.
异歩串行收发器定量发送 Break序列, 包括如下歩骤: 根据发送长度 寄存器中已预先设定的待发送的 Break序列;  The heterogeneous serial transceiver quantitatively transmits the Break sequence, and includes the following steps: according to the pre-set break sequence to be sent in the Transmit Length register;
当异歩串行收发器发送完待发送的 Break序列, 且根据系统发送事件 队列顺序已有其它字符信息或非字符信息序列需要发送, 则异歩串行收发 器根据系统发送事件队列顺序发送已有待发送的内容;  When the isochronous serial transceiver sends the Break sequence to be sent, and other character information or non-character information sequence needs to be sent according to the sequence of the event queue sent by the system, the isochronous serial transceiver sends the sequence according to the system sending event queue. Content to be sent;
当待发送的 Break序列长度等于设定的 Break序列发送比较值, 且异 歩串行收发器无任何内容需要发送, 则发送 Idle序列直到收到系统发送事 件。  When the length of the Break sequence to be transmitted is equal to the set Break sequence transmission comparison value, and the heterogeneous serial transceiver has no content to transmit, the Idle sequence is transmitted until the system sends the event.
如图 3所示, 异歩串行收发器与系统连接的接口包括中断请求信号线 INT和局部总线 Local—bus , 与异歩串行电平转换电路连接的接口包括发送 信号线 TXD和接收信号线 RXD。 图 3未示出异歩串行控制信号线, 以下也不 赘述。  As shown in FIG. 3, the interface connected to the system by the different serial serial transceiver includes an interrupt request signal line INT and a local bus Local_bus, and the interface connected to the different serial level conversion circuit includes a transmission signal line TXD and a received signal. Line RXD. The isochronous serial control signal line is not shown in Fig. 3, and will not be described below.
异歩串行收发器中接收数据信号线 RXD分别与非字符信息识别器、 字 符收发器相连;非字符信息识别器分别通过 Idle序列定量接收单元、 Break 序列定量接收单元相连; 定量发送单元与中断控制器相连, 定量发送单元 还与字符收发器和发送数据信号线 TXD相连。  The receiving data signal line RXD in the different serial serial transceiver is respectively connected with the non-character information identifier and the character transceiver; the non-character information identifier is connected by the Idle serial quantitative receiving unit and the Break sequence quantitative receiving unit respectively; the quantitative transmitting unit and the interrupt The controller is connected, and the quantitative transmitting unit is also connected to the character transceiver and the transmission data signal line TXD.
图 3中, Idle序列定量接收单元包括 Idle序列报告计数器、 Idle序 列累加计数器、 Idle序列分段报告寄存器、 Idle序列最小值寄存器、 Idle 序列最大值寄存器、 Idle序列控制器、 接收 Idle序列长度寄存器、接收队 列控制器。  In FIG. 3, the Idle sequence quantitative receiving unit includes an Idle sequence reporting counter, an Idle sequence accumulating counter, an Idle sequence segment reporting register, an Idle sequence minimum register, an Idle sequence maximum register, an Idle sequence controller, a receiving Idle sequence length register, Receive queue controller.
Idle序列定量发送单元包括 Idle序列发送长度寄存器、发送队列控制 器。  The Idle sequence quantitation transmitting unit includes an Idle sequence transmission length register and a transmission queue controller.
Break序列定量接收单元包括 Break序列报告计数器、 Break序列累加 计数器、 Break序列分段报告寄存器、 Break序列最大值寄存器、 Break序 列控制器、 接收 Break序列长度寄存器、 接收队列控制器。  The Break sequence quantitative receiving unit includes a Break Sequence Report Counter, a Break Sequence Accumulation Counter, a Break Sequence Segment Report Register, a Break Sequence Maximum Register, a Break Sequence Controller, a Receive Break Sequence Length Register, and a Receive Queue Controller.
Break序列定量发送单元包括 Break序列发送长度寄存器、发送队列控 制器。 字符收发器, 用于收发异歩字符数据, 本发明所述异歩串行收发器的 接收字符的功能和使用方法与通用异歩收发器相同。 本发明所述字符收发 器还增加输出一路信号: ReC_char信号 (接收字符信号)。 ReC_char信号 从一个字符码元序列的起始位开始到停止位结束期间为逻辑 0,其余时间为 逻辑 1, 即在 ReC_char信号为逻辑 1时, 表示从接收数据信号线 RXD上收 到非字符码元。 The Break sequence quantitative transmitting unit includes a Break sequence transmission length register and a transmission queue controller. The character transceiver is configured to send and receive different character data, and the function and the use method of the received character of the heterogeneous serial transceiver of the present invention are the same as those of the universal isochronous transceiver. The character transceiver of the present invention also increases the output of one signal: Re C _ch ar signal (received character signal). The Re C _ch ar signal is logic 0 from the start bit of a character symbol sequence to the end of the stop bit, and the other time is logic 1, that is, when the Re C _ch ar signal is logic 1, it indicates the slave data signal line RXD. A non-character symbol was received on it.
字符收发器从起始位开始, 检测到数据位码元为全 0, 并且停止位码元 也为 0, 即判断为 Break序列, 输出检测到 Break序列信号至 Break序列控 制器。 由于字符收发器检查整个字符码元长度后, 才能识别出 Break序列, 因此在检查整个字符码元长度期间, 字符收发器输出的 ReC_char信号为逻 辑 0, 即在出现 Break序列时, 字符收发器输出 Rec—char信号为逻辑 1的 起始位置滞后于实际 Break序列起始位置一个字符长度。 The character transceiver starts from the start bit, detects that the data bit symbol is all 0s, and the stop bit symbol is also 0, that is, the Break sequence is determined, and the output detects the Break sequence signal to the Break sequence controller. Since the character transceiver checks the length of the entire character symbol to recognize the Break sequence, the Re C _ch ar signal output by the character transceiver is logic 0 during the entire character symbol length check, that is, when the Break sequence occurs, the character The transceiver outputs the Rec-char signal to the logical 1 starting position that lags the start of the actual Break sequence by one character length.
字符收发器从停止位结束开始,检测到数据线码元为 1,即判断为 Idle 序列,输出的 Rec_char信号由逻辑 0变为逻辑 1,因此在出现 Idle序列时, 字符收发器输出的 ReC_char信号为逻辑 1的起始位置与实际 Idle序列起 始位置同歩。 The character transceiver starts from the end of the stop bit and detects that the data line symbol is 1, that is, the Idle sequence is determined, and the output Rec_char signal changes from logic 0 to logic 1, so when the Idle sequence occurs, the character transceiver outputs Re C. The _ch ar signal has the same starting position as the logical 1 and the starting position of the actual Idle sequence.
非字符信息识别器, 用于识别接收数据信号线 RXD上收到的非字符码 元是 Idle序列还是 Break序列。非字符信息识别器输出 Idle信号和 Break 信号, 输出信号为逻辑 1期间表示收到相应的序列, 输出信号为逻辑 0期 间表示没有收到相应的序列。  A non-character information identifier for identifying whether the non-character symbol received on the received data signal line RXD is an Idle sequence or a Break sequence. The non-character information recognizer outputs the Idle signal and the Break signal. When the output signal is logic 1, it indicates that the corresponding sequence is received, and the output signal is logic 0 to indicate that the corresponding sequence is not received.
Idle信号输出至 Idle序列报告计数器和 Idle序列累加计数器。 Idle 序列报告计数器和 Idle序列累加计数器在所述非字符信息识别器输出所述 Idle信号为逻辑 1期间进行计数, 计数所用时钟信号频率与字符波特率相 同。  The Idle signal is output to the Idle sequence report counter and the Idle sequence accumulation counter. The Idle sequence report counter and the Idle sequence accumulation counter are counted while the non-character information recognizer outputs the Idle signal to logic 1, and the frequency of the clock signal used for counting is the same as the character baud rate.
Idle序列报告计数器的计数输出作为比较器 1 的一个输入值, Idle 序列分段报告寄存器的设置值作为所述比较器 1 的另一个输入值, 一旦所 述 Idle序列报告计数器的计数输出值大于等于 Idle序列分段报告寄存器 的设置值, 比较器 1的比较结果信号即为逻辑 1, 否则为逻辑 0。 所述比较 器 1的比较结果信号输出至 Idle序列控制器。  The count output of the Idle sequence report counter is used as an input value of the comparator 1, and the set value of the Idle sequence segment report register is used as another input value of the comparator 1, once the count output value of the Idle sequence report counter is greater than or equal to The set value of the Idle sequence segment report register, the comparison result signal of comparator 1 is logic 1, otherwise it is logic 0. The comparison result signal of the comparator 1 is output to the Idle sequence controller.
Idle序列累加计数器的计数输出作为比较器 2 的一个输入值, Idle 序列最小值寄存器的设置值作为比较器 2的另一个输入值, 一旦所述 Idle 序列长度累加计数器的计数输出值大于等于 Idle序列最小值寄存器的设置 值, 比较器 2的比较结果信号即为逻辑 1, 否则为逻辑 0。 比较器 2的比较 结果信号输出至 Idle序列控制器。 The count output of the Idle sequence accumulation counter is used as an input value of the comparator 2, and the set value of the Idle sequence minimum value register is taken as another input value of the comparator 2, once the Idle The count output value of the sequence length accumulation counter is greater than or equal to the set value of the Idle sequence minimum value register, and the comparison result signal of the comparator 2 is logic 1, otherwise it is logic 0. The comparison result signal of the comparator 2 is output to the Idle sequence controller.
Idle序列累加计数器的计数输出作为比较器 3的一个输入值, Idle序 列最大值寄存器的设置数值作为所述比较器 3的另一个输入数值,一旦 Idle 序列长度累加计数器的计数输出值大于等于 Idle序列最大值寄存器的设置 值, 比较器 3的比较结果信号即为逻辑 1, 否则为逻辑 0。 比较器 3的比较 结果信号输出至 Idle序列控制器。  The count output of the Idle sequence accumulation counter is used as an input value of the comparator 3, and the set value of the Idle sequence maximum value register is used as another input value of the comparator 3, once the count output value of the Idle sequence length accumulation counter is greater than or equal to the Idle sequence. The set value of the maximum value register, the comparison result signal of comparator 3 is logic 1, otherwise it is logic 0. The comparison result signal of comparator 3 is output to the Idle sequence controller.
Idle序列控制器的输入信号除比较器 1、 比较器 2和比较器 3输出的 比较结果信号外, 还包括非字符信息识别器输出的 Idle信号和 Idle序列 长度报告计数器的计数输出信号。  The input signal of the Idle sequence controller includes, in addition to the comparison result signals output from the comparator 1, the comparator 2, and the comparator 3, an Idle signal output from the non-character information recognizer and a count output signal of the Idle sequence length report counter.
非字符信息识别器输出的 Idle信号状态为逻辑 1时, 当比较器 1的比 较结果信号状态为逻辑 1、 比较器 3的比较结果信号状态为逻辑 0、 比较器 2的比较结果信号状态由逻辑 0变为逻辑 1, 表明目前接收的 Idle序列长 度达到分段长度但未达到 Idle序列最大值, Idle序列控制器将 Idle序列 长度报告计数器的计数输出值写入接收 Idle序列长度寄存器, 并向接收队 列控制器报告收到 Idle序列事件。 Idle序列控制器同时通过清零信号 1(逻 辑 0电平信号) 清零 Idle序列长度报告计数器。  When the state of the Idle signal output by the non-character information recognizer is logic 1, when the comparison result signal state of the comparator 1 is logic 1, the comparison result signal state of the comparator 3 is logic 0, and the comparison result signal state of the comparator 2 is logic 0 becomes logic 1, indicating that the currently received Idle sequence length reaches the segment length but does not reach the Idle sequence maximum value. The Idle sequence controller writes the count output value of the Idle sequence length report counter to the receive Idle sequence length register, and receives it. The queue controller reports receipt of an Idle sequence event. The Idle sequence controller also clears the Idle sequence length report counter by clearing signal 1 (logic 0 level signal).
非字符信息识别器输出的 Idle信号状态为逻辑 1时, 当比较器 3的比 较结果信号状态由逻辑 0变为逻辑 1, 表明当前接收的 Idle序列长度达到 Idle序列最大值, Idle序列控制器将 Idle序列长度报告计数器的计数输 出值写入接收 Idle序列长度寄存器, 并向接收队列控制器报告收到 Idle 序列事件。 Idle序列控制器发出清零信号 1 (逻辑 0电平信号) 清零并封 锁 Idle序列长度报告计数器, 发出清零信号 2清零并封锁所述接收 Idle 序列长度累加计数器, 在该 Idle序列后续期间一直保持所述清零并封锁状 态, 直到该 Idle序列终止, Idle序列控制器才发出清零信号 1 (逻辑 1 电平信号) 和清零信号 2 (逻辑 1电平信号) 解除对 Idle序列长度报告计 数器和 Idle序列长度累加计数器的封锁。  When the state of the Idle signal output by the non-character information recognizer is logic 1, when the comparison result signal state of the comparator 3 changes from logic 0 to logic 1, indicating that the currently received Idle sequence length reaches the maximum value of the Idle sequence, the Idle sequence controller will The count output value of the Idle sequence length report counter is written to the receive Idle sequence length register and the Idle sequence event is reported to the receive queue controller. The Idle sequence controller issues a clear signal 1 (logic 0 level signal) to clear and block the Idle sequence length report counter, issues a clear signal 2 clear and blocks the receive Idle sequence length accumulation counter, during the subsequent period of the Idle sequence The clear and blocked state is maintained until the Idle sequence is terminated, and the Idle sequence controller issues a clear signal 1 (logic 1 level signal) and a clear signal 2 (logic 1 level signal) to release the length of the Idle sequence. Report counter and Idle sequence length accumulation counter blockade.
当比较器 1的比较结果为逻辑 0, 表明本 Idle序列是碎片, 所述接收 Idle序列报告控制器无动作。  When the comparison result of the comparator 1 is logic 0, indicating that the Idle sequence is fragmented, the receiving Idle sequence reports that the controller has no action.
非字符信息识别器输出的 Idle信号状态由逻辑 1变为逻辑 0时, 表明 Idle序列终止。 When the state of the Idle signal output by the non-character information recognizer changes from logic 1 to logic 0, it indicates The Idle sequence is terminated.
由于 Break信号的起始位置滞后于实际 Break序列起始位置一个字符 长度, 因此以下对于 Break序列长度的计数均不含实际 Break序列头部一 个字符长度的数值。  Since the start position of the Break signal lags the start of the actual Break sequence by one character length, the following counts for the length of the Break sequence do not include the value of one character length of the actual Break sequence header.
Break信号输出至 Break序列报告计数器和接收 Break序列累加计数 器。 Break 序列报告计数器和 Break序列累加计数器在非字符信息识别器 输出 Break信号为逻辑 1期间进行计数, 计数所用时钟信号频率与字符波 特率相同。  The Break signal is output to the Break Sequence Report Counter and the Receive Break Sequence Accumulator Counter. The Break sequence report counter and the Break sequence accumulation counter are counted during the non-character information recognizer output Break signal is logic 1, and the counted clock signal frequency is the same as the character baud rate.
Break序列报告计数器的计数输出作为比较器 4的一个输入值, Break 序列分段报告寄存器的设置值作为比较器 4 的另一个输入值, 一旦 Break 序列报告计数器的计数输出值大于等于所述接收 Break序列分段报告寄存 器的设置值, 比较器 4的比较结果信号即为逻辑 1, 否则为逻辑 0。 比较器 4的比较结果信号输出至 Break序列控制器。  The count output of the Break sequence report counter is used as an input value of the comparator 4, and the set value of the Break sequence segment report register is used as another input value of the comparator 4, once the count output value of the Break sequence report counter is greater than or equal to the receive Break The set value of the sequence segment report register, the comparison result signal of comparator 4 is logic 1, otherwise it is logic 0. The comparison result signal of the comparator 4 is output to the Break sequence controller.
Break序列累加计数器的计数输出作为比较器 5的一个输入值, Break 序列最大值寄存器的设置值作为比较器 5的另一个输入值, 一旦 Break序 列累加计数器的计数输出值大于等于 Break序列最大值寄存器的设置值, 比较器 5的比较结果信号即为逻辑 1, 否则为逻辑 0。 比较器 5的比较结果 信号输出至 Break序列控制器。  The count output of the Break sequence accumulation counter is used as an input value of the comparator 5, and the set value of the Break sequence maximum value register is used as another input value of the comparator 5, once the count output value of the Break sequence accumulation counter is greater than or equal to the Break sequence maximum value register. The set value of Comparator 5 is logic 1 and otherwise logic 0. The comparison result of the comparator 5 is output to the Break sequence controller.
接收 Break序列控制器的输入信号除比较器 4和比较器 5输出的比较 结果信号外, 还包括非字符信息识别器输出的 Break信号和 Break序列报 告计数器的计数输出信号、 以及字符收发器输出的 Break序列检测信号。  The input signal of the receive sequence sequence controller includes, in addition to the comparison result signals output by the comparator 4 and the comparator 5, a Break signal output by the non-character information recognizer and a count output signal of the Break sequence report counter, and a character transceiver output. Break sequence detection signal.
字符收发器输出的 Break序列检测信号状态为逻辑 1时, 表明字符收 发器检测到一个字符长度的 Break序列, Break序列控制器向接收队列控 制器报告收到一个字符长度 Break序列事件, 写入接收 Break序列长度数 据寄存器的数值为一个字符长度, 同时通过清零信号 5清零字符收发器中 Break序列检测信号。  When the status of the Break sequence detection signal output by the character transceiver is logic 1, it indicates that the character transceiver detects a Break sequence of one character length, and the Break sequence controller reports to the receiving queue controller that a character sequence Break sequence event is received, and the write sequence is received. The value of the Break Sequence Length Data Register is one character length, and the Break sequence detection signal in the character transceiver is cleared by clearing the signal 5.
非字符信息识别器输出的 Break信号状态为逻辑 1时, 当比较器 4的 比较结果信号状态由逻辑 0变为逻辑 1,比较器 5的比较结果信号状态为逻 辑 0, 表明当前 Break序列长度达到分段长度但未达到 Break序列最大值, Break序列控制器将 Break序列报告计数器的计数输出值写入接收 Break序 列长度寄存器, 并向接收队列控制器报告收到持续 Break序列事件。 Break 序列控制器同时通过清零信号 3清零 Break序列长度报告计数器。 When the state of the Break signal output by the non-character information recognizer is logic 1, when the comparison result signal state of the comparator 4 changes from logic 0 to logic 1, the comparison result signal state of the comparator 5 is logic 0, indicating that the current Break sequence length is reached. The segment length does not reach the maximum value of the Break sequence. The Break sequence controller writes the count output value of the Break sequence report counter to the receive Break sequence length register, and reports to the receive queue controller that a persistent Break sequence event is received. Break The sequence controller also clears the Break sequence length report counter by clearing the signal 3.
非字符信息识别器输出的 Break信号状态为逻辑 1时, 当比较器 5的 比较结果信号状态由逻辑 0变为逻辑 1,表明当前 Break序列长度达到 Break 序列最大值, Break序列控制器将 Break序列报告计数器的计数输出值写 入接收 Break序列长度寄存器, 并向接收队列控制器报告收到持续 Break 序列事件。 Break序列控制器发出清零信号 3 (逻辑 0电平信号)清零并封 锁 Break序列报告计数器, 发出清零信号 4 (逻辑 0电平信号)清零并封锁 接收 Break序列累加计数器, 在本 Break序列后续期间一直保持所述清零 并封锁状态, 直到本 Break序列终止 Break序列控制器才发出清零信号 3 (逻辑 1电平信号)和清零信号 4 (逻辑 1电平信号)解除对 Break序列报 告计数器和 Break序列累加计数器的封锁, 并报告收到 Break序列终止事 件。  When the state of the Break signal output by the non-character information recognizer is logic 1, when the comparison result signal state of the comparator 5 changes from logic 0 to logic 1, indicating that the current Break sequence length reaches the maximum value of the Break sequence, the Break sequence controller will perform the Break sequence. The count output value of the report counter is written to the receive Break sequence length register and the receive queue sequence event is reported to the receive queue controller. The Break sequence controller sends a clear signal 3 (logic 0 level signal) to clear and blocks the Break sequence report counter, issues a clear signal 4 (logic 0 level signal) to clear and blocks the receive Break sequence accumulation counter, in this Break The clearing and blocking state is maintained for the subsequent period of the sequence until the Break sequence terminates the Break sequence controller to issue a clear signal 3 (logic 1 level signal) and a clear signal 4 (logic 1 level signal) to remove the Break. The sequence report counter and the Break sequence accumulate counters are blocked, and the receipt of the Break sequence termination event is reported.
非字符信息识别器输出的 Break信号状态由逻辑 1变为逻辑 0时, 表 明 Break序列终止。 当比较器 5的比较结果信号状态为逻辑 0, 表明当前接 收的 Break序列长度未达到 Break序列最大值, Break序列控制器将 Break 序列报告计数器的计数输出值写入接收 Break序列寄存器, 并向接收队列 控制器报告收到 Break序列终止事件。 Break序列控制器同时发出清零信号 3清零 Break序列报告计数器,发出清零信号 4清零 Break序列累加计数器。  When the state of the Break signal output by the non-character information recognizer changes from logic 1 to logic 0, it indicates that the Break sequence is terminated. When the comparison result signal state of the comparator 5 is logic 0, indicating that the length of the currently received Break sequence does not reach the maximum value of the Break sequence, the Break sequence controller writes the count output value of the Break sequence report counter into the receive Break sequence register, and receives the The queue controller reports that a Break sequence termination event has been received. The Break sequence controller simultaneously issues a clear signal. 3 Clear The Break sequence reports the counter and issues a clear signal. 4 Clears the Break sequence accumulation counter.
所述接收队列控制器接收的报告事件包括:  The reporting events received by the receiving queue controller include:
1)字符收发器报告的收到字符事件;  1) The received character event reported by the character transceiver;
2)字符收发器报告的所述检测到 Break序列事件;  2) the detected break sequence event reported by the character transceiver;
3)接收 Idle序列报告控制器报告的所述收到 Idle序列事件;  3) receiving the received Idle sequence event reported by the Idle sequence report controller;
4)接收 Break序列报告控制器报告的所述收到一个字符长度 Break序 列事件;  4) receiving the Break sequence report controller report that the received sequence length of the Break sequence event;
5)接收 Break序列报告控制器报告的所述收到持续 Break序列事件; 5) receiving the received continuous break sequence event reported by the Break Sequence Report Controller;
6) Break序列报告控制器报告的接收 Break序列终止事件。 6) The Break sequence report controller receives the Receive Sequence termination event.
接收队列控制器将其收到的所述各种报告事件组织成队列, 按序向中 断控制器发出事件报告信号, 中断控制器接收到事件报告信号后产生中断 请求信号 INT。 中断控制器在已有中断请求信号 INT未被响应的情况下, 控 制接收队列控制器暂不发出新的事件报告信号。  The receiving queue controller organizes the various report events that it receives into a queue, and issues an event report signal to the interrupt controller in sequence, and the interrupt controller generates an interrupt request signal INT after receiving the event report signal. The interrupt controller controls the receive queue controller not to issue a new event report signal if the existing interrupt request signal INT is not responding.
Idle序列发送长度寄存器,用于控制所述异歩串行收发器发送 Idle序 列的长度, 由系统向 Idle序列发送长度寄存器设置要发送的 Idle序列长 度数值。 Idle sequence transmission length register for controlling the isochronous serial transceiver to send an Idle sequence The length of the column, the system sends a length register to the Idle sequence to set the length of the Idle sequence length to be sent.
Break序列发送长度寄存器, 用于控制所述异歩串行收发器发送 Break 序列的长度, 由系统向 Break序列发送长度寄存器写入要发送的 Break序 列长度数值。  The Break sequence transmission length register is configured to control the length of the Break sequence sent by the heterogeneous serial transceiver, and the length of the Break sequence to be sent is written by the system to the Break sequence transmission length register.
发送队列控制器, 将其收到的各种发送事件组织成队列, 按序向发送 数据信号线 TXD发送。 当发送队列控制器发送完字符数据、 Break序列或 Idle序列, 或者余下的未发送完部分达到设置水平时, 发送队列控制器向 中断控制器发出发送事件报告信号, 中断控制器接收到发送事件报告信号 后产生中断请求信号 INT。所述中断控制器在已有中断请求信号 INT未被响 应的情况下, 控制所述发送队列控制器暂不发出新的发送事件报告信号。  The sending queue controller organizes various transmission events it receives into a queue, and sends them in sequence to the transmitting data signal line TXD. When the sending queue controller sends the character data, the Break sequence or the Idle sequence, or the remaining unsent parts reach the set level, the sending queue controller sends an event reporting signal to the interrupt controller, and the interrupt controller receives the sending event report. An interrupt request signal INT is generated after the signal. The interrupt controller controls the transmit queue controller not to issue a new transmit event report signal if the existing interrupt request signal INT is not responded.
以上所述仅为本发明较佳的具体实施方式, 但本发明的保护范围并不 局限于此, 任何熟悉该技术的人在本发明揭露的技术范围以内, 可以轻易 想到的变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的 保护范围应该以权利要求书的保护范围为准。  The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention. It should be covered by the scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

权 利 要 求 书 Claim
1、 异歩串行数据线信息收发方法, 异歩串行收发器通过异歩串行数据 线收发字符数据信息, 其特征在于, 还包括收发非字符信息的歩骤:  1. The method for sending and receiving serial data line information is different. The different serial serial transceiver transmits and receives character data information through the different serial data lines, and is characterized in that it further includes the steps of transmitting and receiving non-character information:
a、 异歩串行收发器从异歩串行数据线接收非字符信息时, 识别非字符 信息的序列类型并统计非字符信息的序列长度, 定量接收非字符信息, 并 向系统报告收到非字符信息事件;  a. When the heterogeneous serial transceiver receives non-character information from the different serial data lines, it identifies the sequence type of the non-character information and counts the sequence length of the non-character information, quantitatively receives the non-character information, and reports the received non-character to the system. Character information event;
b、 异歩串行收发器向异歩串行数据线发送非字符信息时, 根据从系统 收到的发送非字符信息事件, 定量发送非字符信息。  b. When the heterogeneous serial transceiver sends non-character information to the different serial data line, the non-character information is quantitatively transmitted according to the non-character information event received from the system.
2、 如权利要求 1所述异歩串行数据线信息收发方法, 其特征在于, 所 述非字符信息为 Idle序列。  2. The method for transmitting and receiving heterogeneous serial data line information according to claim 1, wherein the non-character information is an Idle sequence.
3、 如权利要求 2所述异歩串行数据线信息收发方法, 其特征在于, 歩 骤 a所述定量接收非字符信息,对于接收 Idle序列时具体为:预先设定 Idle 序列最小值、 Idle序列分段报告长度、 Idle序列最大值; 所述 Idle序列 最大值〉 Idle序列分段报告长度〉 Idle序列最小值; 分类处理过程如下: The method for transmitting and receiving data of the different serial data line according to claim 2, wherein the step (a) receives the non-character information quantitatively, and when receiving the Idle sequence, specifically: presetting the Idle sequence minimum value, Idle Sequence segmentation report length, Idle sequence maximum value; Idle sequence maximum value> Idle sequence segmentation report length> Idle sequence minimum value; classification processing process is as follows:
( 1 ) 如待接收的 Idle序列长度 Idle序列最小值, 异歩串行收发器 统计完该 Idle序列长度后, 异歩串行收发器忽略该 Idle序列, 不向系统 报告收到 Idle序列事件; (1) If the Idle sequence length of the Idle sequence to be received is the minimum value, after the isochronous serial transceiver counts the length of the Idle sequence, the isochronous serial transceiver ignores the Idle sequence and does not report to the system that the Idle sequence event is received;
( 2 )如 Idle序列最小值 <待接收的 Idle序列长度 Idle序列分段报 告长度, 异歩串行收发器定量接收的 Idle序列长度等于统计的 Idle序列 长度, 并向系统报告收到 Idle序列事件;  (2) If the Idle sequence minimum value <Idle sequence length Idle sequence segmentation report length to be received, the Idle sequence length of the heterogeneous serial transceiver is equal to the statistical Idle sequence length, and reports the received Idle sequence event to the system. ;
( 3 )如 Idle序列分段报告长度 <待接收的 Idle序列长度< 1(116序列 最大值, 每当统计的 Idle序列长度等于 Idle序列分段报告长度时, 异歩 串行收发器就向系统报告一次收到 Idle序列事件并清零重新分段统计 Idle 序列长度, 直至到本 Idle序列的终点, 最后一次向系统报告收到 Idle序 列事件; 除最后一次报告收到 Idle序列事件外, 异歩串行收发器定量接收 的 Idle序列长度等于 Idle序列分段报告长度; 最后一次报告收到 Idle序 列事件中, 异歩串行收发器定量接收的 Idle序列长度等于最后一次分段统 计的 Idle序列长度; (3) If the Idle sequence segment report length <the length of the Idle sequence to be received < 1 (11 6 sequence maximum, whenever the length of the Idle sequence is equal to the length of the Idle sequence segment report, the isochronous serial transceiver will The system reports that the Idle sequence event is received once and the re-segmentation statistics Idle sequence length is cleared until the end of the Idle sequence, and the Idle sequence event is reported to the system for the last time; except for the last report receiving the Idle sequence event, The serial length of the Idle sequence received by the serial transceiver is equal to the length of the Idle sequence segment report; the last time the Idle sequence event is received, the Idle sequence length of the heterogeneous serial transceiver is equal to the Idle sequence of the last segmentation statistics. length;
( 4)如 Idle序列最大值 待接收的 Idle序列长度时,每当统计的 Idle 序列长度等于 Idle序列分段报告长度时, 异歩串行收发器就向系统报告一 次收到 Idle序列事件并清零重新分段统计 Idle序列长度,直至累计的 Idle 序列长度等于 Idle序列最大值时, 异歩串行收发器停止统计并最后一次向 系统报告收到 Idle序列事件; 除最后一次报告收到 Idle序列事件外, 异 歩串行收发器定量接收的 Idle序列长度等于 Idle序列分段报告长度; 最 后一次报告收到 Idle序列事件中, 异歩串行收发器定量接收的 Idle序列 长度等于累计到 Idle序列最大值时, 最后一次分段统计的 Idle序列长度; 所述待接收的 Idle序列是指异歩串行数据线上连续的一段 Idle序列。 (4) If the Idle sequence maximum value is to be received by the Idle sequence length, whenever the statistical Idle sequence length is equal to the Idle sequence segment report length, the heterogeneous serial transceiver reports to the system that the Idle sequence event is received and cleared. Zero re-segmentation statistics Idle sequence length until the accumulated Idle When the sequence length is equal to the maximum value of the Idle sequence, the isochronous serial transceiver stops counting and reports to the system the Idle sequence event is received. The Idle sequence transceiver receives the Idle sequence event. The sequence length is equal to the Idle sequence segment report length; the last time the Idle sequence event is received, the length of the Idle sequence received by the heterogeneous serial transceiver is equal to the Idle sequence length of the last segmentation. The Idle sequence to be received refers to a continuous Idle sequence on the heterologous serial data line.
4、 如权利要求 3所述异歩串行数据线信息收发方法, 其特征在于, 歩 骤 b所述定量发送非字符信息, 对于发送 Idle序列时具体为: 根据发送长 度寄存器中系统已预先设定待发送的 Idle序列长度;  4. The method according to claim 3, wherein the step b is to send non-character information quantitatively, and the method for transmitting the Idle sequence is: according to the system in the transmission length register The length of the Idle sequence to be sent;
当异歩串行收发器发送完待发送的 Idle序列, 且根据系统发送事件队 列顺序已有其它字符信息或非字符信息序列需要发送, 则异歩串行收发器 根据系统发送事件队列顺序发送已有待发送的内容;  When the isochronous serial transceiver sends the Idle sequence to be sent, and other character information or non-character information sequence needs to be sent according to the system sending event queue order, the isochronous serial transceiver sends the sequence according to the system sending event queue. Content to be sent;
当异歩串行收发器发送完待发送的 Idle序列, 且异歩串行收发器无任 何内容需要发送, 则继续发送 Idle序列直到收到系统发送事件。  When the isochronous serial transceiver sends the Idle sequence to be transmitted, and the isochronous serial transceiver does not have any content to transmit, the Idle sequence continues to be transmitted until the system sends an event.
5、 如权利要求 2至 4任一项权利要求所述异歩串行数据线信息收发方 法, 其特征在于, 所述非字符信息还包括 Break序列。  The method for transmitting and receiving an isochronous serial data line information according to any one of claims 2 to 4, wherein the non-character information further comprises a break sequence.
6、 如权利要求 5所述异歩串行数据线信息收发方法, 其特征在于, 歩 骤 a所述定量接收非字符信息, 对于接收 Break序列时具体为: 预先设定 Break序列最大值、 Break序列分段报告长度, 所述 Break序列最大值〉 Break序列分段报告长度;  The method for transmitting and receiving data of the different serial data line according to claim 5, wherein the quantitatively receiving the non-character information according to step a is specifically: when the Break sequence is received, the maximum value of the Break sequence is preset. Sequence segment report length, the maximum value of the Break sequence > Break sequence segment report length;
( 1 ) 当待接收的 Break序列长度等于一个字符的长度, 异歩串行数据 收发器向系统报告收到 Break序列事件, 进入歩骤 (2 ) ;  (1) When the length of the Break sequence to be received is equal to the length of one character, the heterogeneous serial data transceiver reports to the system that the Break sequence event is received, and proceeds to step (2);
( 2 ) 如待接收的 Break序列长度 Break序列分段报告长度, 异歩串 行收发器统计完该 Idle序列长度后, 立即向系统报告收到 Break序列和 Break序列终止事件;异歩串行收发器定量接收的 Break序列长度等于统计 的 Break序列长度;  (2) If the length of the Break sequence length of the Break sequence to be received is the length of the segment sequence report, the isochronous serial transceiver reports the receipt of the Break sequence and the Break sequence termination event to the system immediately after counting the length of the Idle sequence; The length of the Break sequence received by the device is equal to the length of the statistical Break sequence;
( 3 ) 如 Break序列分段报告长度 <待接收的 Break序列长度<81^&1^ 序列最大值, 每当统计的 Break序列长度等于 Break序列分段报告长度时, 异歩串行收发器就向系统报告一次收到 Break序列事件并清零重新分段统 计 Break序列长度, 直至到本 Break序列的终点, 最后一次向系统报告收 到 Break序列事件和 Break序列终止事件; 除最后一次报告收到 Break序 列事件外, 异歩串行收发器定量接收的 Break序列长度等于 Break序列分 段报告长度; 最后一次报告收到 Break序列事件中, 异歩串行收发器定量 接收的 Break序列长度等于最后一次分段统计的 Break序列长度; (3) If the Break sequence segment report length <the length of the Break sequence to be received <81^&1^ sequence maximum, whenever the length of the statistical Break sequence is equal to the length of the Break sequence segment report, the isochronous serial transceiver will The system reports that the Break sequence event is received once and the resegmentation statistics Break sequence length is cleared until the end of the Break sequence, and the last time the report receives the Break sequence event and the Break sequence termination event; except for the last report received Break Preface In addition to the column event, the length of the Break sequence received by the heterogeneous serial transceiver is equal to the length of the Break sequence segment report; the last time the report receives the Break sequence event, the length of the Break sequence received by the heterogeneous serial transceiver is equal to the last time. The length of the Break sequence of the segment statistics;
( 4) 如待接收的 Break序列 ^Break序列最大值; 每当统计的 Break 序列长度等于 Break序列分段报告长度时, 异歩串行收发器就向系统报告 一次收到 Break序列事件并清零重新分段统计 Break序列长度, 直至累计 的 Break序列长度等于 Break序列最大值时, 异歩串行收发器停止统计并 最后一次向系统报告收到 Break序列事件, 直到该 Break序列终点才报告 Break序列终止事件; 除最后一次报告收到 Break序列事件外, 异歩串行收 发器定量接收的 Break序列长度等于 Break序列分段报告长度; 最后一次 报告收到 Break序列事件中异歩串行收发器定量接收的 Break序列长度等 于累计到 Break序列最大值时, 最后一次分段统计时的 Break序列长度; 所述待接收的 Break序列是指异歩串行数据线上连续的一段 Break序 列。  (4) If the Break sequence to be received is the maximum value of the Break sequence; whenever the length of the Break sequence is equal to the length of the Break sequence segment report, the isochronous serial transceiver reports to the system that the Break sequence event is received and cleared. Re-segmentation statistics Break sequence length, until the accumulated Break sequence length is equal to the Break sequence maximum, the heterogeneous serial transceiver stops counting and reports to the system the last received Break sequence event until the Break sequence end point reports the Break sequence Termination event; except for the last report receipt of the Break sequence event, the length of the Break sequence received by the heterogeneous serial transceiver is equal to the length of the Break sequence segment report; the last report receives the quasi-sequence transceiver in the Break sequence event. The length of the received Break sequence is equal to the length of the Break sequence when the last segmentation statistics are accumulated to the maximum value of the Break sequence; the Break sequence to be received refers to a consecutive Break sequence on the different serial data lines.
7、 如权利要求 6所述异歩串行数据线信息收发方法, 其特征在于, 歩 骤 b所述定量发送非字符信息, 对于发送 Break序列时具体为: 根据发送 长度寄存器中系统已预先设定待发送的 Break序列长度;  7. The method for transmitting and receiving heterogeneous serial data line information according to claim 6, wherein the step b transmits the non-character information quantitatively, and when transmitting the Break sequence, the specific: according to the transmission length register, the system has been preset. The length of the Break sequence to be sent;
当异歩串行收发器发送完待发送的 Break序列, 且根据系统发送事件 队列顺序已有其它字符信息或非字符信息序列需要发送, 则异歩串行收发 器根据系统发送事件队列顺序发送已有待发送的内容;  When the isochronous serial transceiver sends the Break sequence to be sent, and other character information or non-character information sequence needs to be sent according to the sequence of the event queue sent by the system, the isochronous serial transceiver sends the sequence according to the system sending event queue. Content to be sent;
当待发送的 Break序列长度等于设定的 Break序列发送比较值, 且异 歩串行收发器无任何内容需要发送, 则发送 Idle序列直到收到系统发送事 件。  When the length of the Break sequence to be transmitted is equal to the set Break sequence transmission comparison value, and the heterogeneous serial transceiver has no content to transmit, the Idle sequence is transmitted until the system sends the event.
8、 异歩串行收发器, 包括字符收发器、 中断控制器, 中断控制器与字 符收发器相连, 其特征在于, 还包括非字符信息识别器、 定量接收单元; 非字符信息识别器的输入端、 字符收发器的输入端分别与接收数据信号线 相连; 非字符信息识别器与定量接收单元相连; 定量接收单元的输出端连 接中断控制器;  8. The heterogeneous serial transceiver comprises a character transceiver, an interrupt controller, and the interrupt controller is connected to the character transceiver, and is characterized in that it further comprises a non-character information identifier and a quantitative receiving unit; the input of the non-character information identifier The input end of the end and the character transceiver are respectively connected to the receiving data signal line; the non-character information identifier is connected to the quantitative receiving unit; the output end of the quantitative receiving unit is connected to the interrupt controller;
所述非字符信息识别器用于识别非字符信息的序列类型;  The non-character information identifier is used to identify a sequence type of non-character information;
所述定量接收单元用于统计非字符信息的序列长度, 定量接收非字符 自 The quantitative receiving unit is configured to count the sequence length of the non-character information, and quantitatively receive the non-character from
9、 如权利要求 8所述异歩串行收发器, 其特征在于, 定量接收单元包 括计数器、 接收比较器、 接收比较寄存器、 非字符信息控制器、 接收长度 寄存器、 接收队列控制器; 非字符信息识别器与计数器相连; 接收比较寄 存器与接收比较器的一个输入端相连, 接收比较器的另一个输入端与计数 器相连; 非字符信息控制器分别与接收比较器、 计数器、 非字符信息识别 器相连; 非字符信息控制器的控制端与计数器相连; 非字符信息控制器的 输出端分别与接收长度寄存器和接收队列控制器相连, 接收队列控制器的 输出端连接中断控制器; 9. The meta-synchronous serial transceiver according to claim 8, wherein the quantitative receiving unit comprises a counter, a receiving comparator, a receiving comparison register, a non-character information controller, a receiving length register, and a receiving queue controller; The information identifier is connected to the counter; the receiving comparison register is connected to one input of the receiving comparator, and the other input of the receiving comparator is connected to the counter; the non-character information controller and the receiving comparator, the counter, and the non-character information identifier respectively Connected; the control end of the non-character information controller is connected to the counter; the output end of the non-character information controller is respectively connected to the receive length register and the receive queue controller, and the output end of the receive queue controller is connected to the interrupt controller;
所述计数器用于统计待接收的非字符信息的序列长度;  The counter is configured to count a sequence length of non-character information to be received;
所述接收比较寄存器用于存储预先设定的控制接收序列长度值; 所述接收比较器用于比较待接收的非字符信息的序列长度与控制接收 序列长度值, 将比较结果输出到非字符信息控制器;  The receiving comparison register is configured to store a preset control receiving sequence length value; the receiving comparator is configured to compare a sequence length of the non-character information to be received and a control receiving sequence length value, and output the comparison result to the non-character information control Device
所述接收长度寄存器用于存储定量接收的非字符信息;  The receive length register is configured to store quantitatively received non-character information;
所述非字符信息控制器用于根据所述比较结果将定量接收的非字符信 息写入接收长度寄存器, 并向接收队列控制器报告接收到非字符信息事件; 所述接收队列控制器用于将来自于非字符信息控制器、 字符收发器的 报告事件组织成队列, 按序向中断控制器发出事件报告信号。  The non-character information controller is configured to write the quantitatively received non-character information into the receiving length register according to the comparison result, and report the receiving non-character information event to the receiving queue controller; the receiving queue controller is used to The report events of the non-character information controller and the character transceiver are organized into a queue, and an event report signal is sent to the interrupt controller in sequence.
10、 如权利要求 9所述异歩串行收发器, 其特征在于, 所述定量接收 单元包括 Idle序列定量接收单元, 所述接收比较寄存器保存的预先设定的 控制接收序列长度值包括: Idle序列最小值、 Idle序列分段报告长度、 Idle 序列最大值。  10. The heterogeneous serial transceiver according to claim 9, wherein the quantitative receiving unit comprises an Idle sequence quantitative receiving unit, and the preset control receiving sequence length value saved by the receiving comparing register comprises: Idle Sequence minimum, Idle sequence segmentation report length, Idle sequence maximum.
11、 如权利要求 10所述异歩串行收发器, 其特征在于, 所述定量接收 单元还包括 Break序列定量接收单元, 所述接收比较寄存器存储的预先设 定的控制接收序列长度值还包括: Break序列分段报告长度、 Break序列最 大值。  The all-in-one serial transceiver according to claim 10, wherein the quantitative receiving unit further comprises a Break sequence quantitative receiving unit, and the preset control receiving sequence length value stored in the receiving comparing register further includes : Break sequence segment report length, Break sequence maximum.
12、 如权利要求 8或 9所述异歩串行收发器, 其特征在于, 还包括定 量发送单元, 定量发送单元输出端连接发送数据信号线相连。  12. The meta-synchronous serial transceiver according to claim 8 or 9, further comprising a quantitative transmitting unit, wherein the output of the quantitative transmitting unit is connected to the transmitting data signal line.
13、 如权利要求 12所述异歩串行收发器, 其特征在于, 定量发送单元 包括发送队列控制器、 发送长度寄存器; 所述字符收发器与发送队列控制 器的一个输入端相连; 发送长度寄存器与发送队列控制器的另一个输入端 相连; 发送队列控制器的输出端连接发送数据信号线, 发送队列控制器还 与中断控制器相连; 13. The heterogeneous serial transceiver of claim 12, wherein the quantitative transmitting unit comprises a transmit queue controller and a transmit length register; the character transceiver is coupled to an input of the transmit queue controller; The register is connected to another input of the transmit queue controller; the output of the transmit queue controller is connected to the transmit data signal line, and the transmit queue controller is further Connected to the interrupt controller;
所述发送长度寄存器用于保存已设定的待发送的非字符信息; 所述发送队列控制器用于将收到的发送事件组织成队列, 根据已设定 的待发送非字符信息序列长度, 按序向发送数据信号线发送。  The sending length register is configured to save the set non-character information to be sent; the sending queue controller is configured to organize the received sending event into a queue, according to the set length of the non-character information sequence to be sent, The sequence sends a data signal line to send.
14、 如权利要求 13所述异歩串行收发器, 其特征在于, 所述定量发送 单元包括 Idle序列定量发送单元、 Break序列定量发送单元, 所述发送长 度寄存器保存的已设定的待发送的非字符信息包括 Idle序列、 Break序列。  The all-in-one serial transceiver according to claim 13, wherein the quantitative transmitting unit comprises an Idle sequence quantitative transmitting unit, a Break sequence quantitative transmitting unit, and the set length to be sent in the transmission length register. The non-character information includes an Idle sequence and a Break sequence.
PCT/CN2008/071466 2007-09-05 2008-06-27 Information transceiving method of asynchronous serial data line and asynchronous serial transceiver WO2009030129A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200710201585.3 2007-09-05
CN2007102015853A CN101383819B (en) 2007-09-05 2007-09-05 Asynchronous serial data line information transceiving method and asynchronous serial transceiver

Publications (1)

Publication Number Publication Date
WO2009030129A1 true WO2009030129A1 (en) 2009-03-12

Family

ID=40428461

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/071466 WO2009030129A1 (en) 2007-09-05 2008-06-27 Information transceiving method of asynchronous serial data line and asynchronous serial transceiver

Country Status (2)

Country Link
CN (1) CN101383819B (en)
WO (1) WO2009030129A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016209866A1 (en) * 2015-06-22 2016-12-29 Microchip Technology Incorporated Independent uart brk detection

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882754B (en) * 2012-09-29 2015-08-05 南京国电南自轨道交通工程有限公司 Repeated interruptions mode 485 direction-controlling method
CN105893291B (en) * 2014-11-18 2020-06-09 刘伯安 Method and device for asynchronously receiving serial data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1311592A (en) * 2000-05-25 2001-09-05 深圳市中兴通讯股份有限公司 Full duplex asynchronous serial communication method and its communication system
CN1361888A (en) * 1999-07-16 2002-07-31 汤姆森许可公司 Method and apparatus for generating a control signal bitstream
US20040246997A1 (en) * 2001-10-15 2004-12-09 Stmicroelectronics Sa Asynchronous receiver of the UART-type with two operating modes
US20040252704A1 (en) * 2001-10-15 2004-12-16 Stmicroelectronics Sa Hot synchronization device of an asynchronous frame receiver

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2803262B2 (en) * 1989-12-15 1998-09-24 日本電気株式会社 Packet switch

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1361888A (en) * 1999-07-16 2002-07-31 汤姆森许可公司 Method and apparatus for generating a control signal bitstream
CN1311592A (en) * 2000-05-25 2001-09-05 深圳市中兴通讯股份有限公司 Full duplex asynchronous serial communication method and its communication system
US20040246997A1 (en) * 2001-10-15 2004-12-09 Stmicroelectronics Sa Asynchronous receiver of the UART-type with two operating modes
US20040252704A1 (en) * 2001-10-15 2004-12-16 Stmicroelectronics Sa Hot synchronization device of an asynchronous frame receiver

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016209866A1 (en) * 2015-06-22 2016-12-29 Microchip Technology Incorporated Independent uart brk detection

Also Published As

Publication number Publication date
CN101383819B (en) 2012-02-01
CN101383819A (en) 2009-03-11

Similar Documents

Publication Publication Date Title
US9210107B2 (en) Method and apparatus for adjusting a rate at which data is transferred, within a network device, from a media access controller to a memory connected between the media access controller and a physical-layer device
US8762760B2 (en) Method and apparatus for adaptive power control in a multi-lane communication channel
US5862145A (en) Method and system for identifying an error condition due to a faulty cable connection in an ethernet network
CN101047615B (en) Control method for Ethernet data flow
WO2009030129A1 (en) Information transceiving method of asynchronous serial data line and asynchronous serial transceiver
CN109062850B (en) Data sending and receiving method of single chip microcomputer
CN107771331B (en) Independent UARK BRK detection
US6778551B1 (en) Collision control systems and methods utilizing an inter-frame gap code counter
EP0424300B1 (en) A method of multi-frame stripping for token ring networks
TW201510733A (en) Electronic device and method for reducing power consumption of electronic device
CN111600809A (en) Gigabit single-optical-port server adapter
CN103885910A (en) Method and system for multiple devices for IIC communication in main mode
JP3908667B2 (en) Mechanism to extract LARQ header and regenerate FCS to support return to sleep mode
CN101808103A (en) Device and method for realizing point to point protocol data service disconnection
US5793803A (en) Underrecovery system and method for block processing modems
CN112804321A (en) Method, device, equipment and storage medium for caching and forwarding Ethernet data packet
CN107346294B (en) Data flow control system and method based on SPI protocol
US6810024B1 (en) Auto-detection system and method for a network transceiver
JPH06216969A (en) Method of series-message transmission, and receiver thereof
CN101764792A (en) Method for identifying frame address in asynchronous communication control
CN115390917A (en) Processing method and storage medium for receiving data by MCU
CN108462528B (en) FC link timeout processing circuit
CN116436489A (en) UART interaction system and method in half-duplex mode
CN101286821B (en) Semi-duplex counter pressure flow controlling method and device
WO2013189276A1 (en) Method, device and system for improving performance of data transmission

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08757865

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 1460/CHENP/2010

Country of ref document: IN

122 Ep: pct application non-entry in european phase

Ref document number: 08757865

Country of ref document: EP

Kind code of ref document: A1