Electronic device, network switch, and interrupt transmission and reception method
By encoding and decoding interrupt information in the idle interval of data segments, the problem of difficulty in transmitting interrupt source information in the existing technology is solved, more efficient interrupt event processing and circuit simplification are achieved, and costs and burdens are reduced.
Patent Information
- Application Number
- CN201911030386.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2039-10-28
AI Technical Summary
Existing electronic devices cannot transmit interrupt source information through interrupt pins, resulting in high circuit cost, complex design, low processing efficiency, and heavy burden on the control circuit. This problem becomes more prominent when the number of slave chips is large.
Encoders and decoders are used to transmit interrupt information in the idle interval of data segments, and digital data is transmitted through data pins. The main chip processes interrupt events after decoding and directly obtains interrupt source information, avoiding the use of dedicated interrupt pins.
It reduces circuit cost and layout complexity, improves interrupt event processing efficiency, reduces the burden on the control circuit, and simplifies circuit design and circuit layout.
Smart Images

Figure CN112732602B
Abstract
Description
Technical Field
[0001] The present invention relates to interrupt processing, and in particular to the transmission and reception of interrupts. Background Art
[0002] Figure 1 It is a functional block diagram of an existing electronic device. The electronic device 100 includes a main chip 110 and multiple slave chips 120. The main chip 110 includes multiple interrupt pins 116, multiple data pins 118 and a control pin 119. Each slave chip 120 includes an interrupt pin 122, a data pin 124 and a control pin 126. The slave chip 120 is responsible for a part of the work of the electronic device 100, and transmits data to the main chip 110 through the data pin 124 and the data pin 118. The slave chip 120 generates an interrupt notification when an interrupt event is detected, and transmits the interrupt to the main chip 110 through the interrupt pin 122 and the interrupt pin 116. The interrupt event is, for example, a data abnormality or a circuit abnormality. The control circuit 112 of the main chip 110 receives the interrupt notification through the bus 114. The interrupt notification sent by the slave chip 120 is only used to notify the main chip 110 that an interrupt event has occurred, but does not include the interrupt source (interrupt source), which is used to indicate the type of interrupt event or provide details of the interrupt event. Generally speaking, after receiving the interrupt notification, the main chip 110 needs to further know the interrupt source in order to decide how to handle the interrupt event. Since the existing electronic device 100 cannot transmit the interrupt source through the interrupt pin 116 and the interrupt pin 122, the control circuit 112 must read the interrupt source from the slave chip 120 through the control pin 119 and the control pin 126 (the interrupt source may be stored in the register of the slave chip 120).
[0003] The electronic device 100 has the following disadvantages: (1) the interrupt pin increases the circuit cost, the difficulty of circuit design, and the complexity of circuit layout on the circuit board; and (2) the operation of reading the interrupt source increases the workload of the control circuit 112. These disadvantages will become more significant when the number of slave chips 120 increases. Summary of the invention
[0004] In view of the shortcomings of the prior art, an object of the present invention is to provide an electronic device, a network switch, and an interrupt transmission and reception method to solve the existing problems.
[0005] The present invention discloses an electronic device. The electronic device includes a slave chip and a main chip. The slave chip is used to generate multiple data segments and at least one interrupt information, and includes an encoder. The encoder is used to encode the data segments and the interrupt information to generate digital data. The interrupt information is located between the data segments. The main chip is coupled to the slave chip, used to receive digital data, and includes a decoder and a control circuit. The decoder is used to decode the digital data to obtain the data segments and the interrupt information. The control circuit is coupled to the decoder and used to process the interrupt information.
[0006] The present invention also discloses an interrupt transmission and reception method, which is applied to an electronic device including a slave chip and a master chip. The slave chip includes a first data pin and the master chip includes a second data pin. The interrupt transmission and reception method includes: the slave chip generates a plurality of data segments, wherein there are idle intervals between the data segments; the slave chip detects an interrupt event, and when the interrupt event occurs, the slave chip places interrupt information in the idle interval; the slave chip encodes the data segment and the interrupt information to generate digital data; the slave chip transmits the digital data through the first data pin; the master chip receives the digital data through the second data pin; the master chip decodes the digital data to obtain the interrupt information; and processes the interrupt event.
[0007] The present invention also discloses a network switch. The network switch includes a port physical layer chip and a main chip. The port physical layer chip includes a first data pin and an encoder, which is used to: generate multiple packets; detect interrupt events to generate interrupt information; use the encoder to encode packets and interrupt information to generate digital data; and transmit digital data through the first data pin. A main chip includes a second data pin and a decoder, and is coupled to the port physical layer chip through the first data pin and the second data pin. The main chip is used to: receive digital data through the second data pin; use the decoder to decode the digital data to obtain packets and interrupt information; and process interrupt events.
[0008] The electronic device, network switch and electronic device implementing the interrupt transmission and reception method of the present invention can save the interrupt pin and quickly know the interrupt source. Compared with the prior art, the present invention has the following advantages: (1) reducing packaging cost; (2) reducing the difficulty of circuit layout on the circuit board to avoid cutting the power / ground layout; (3) improving the efficiency of interrupt event processing; and (4) reducing the burden of the control circuit.
[0009] The features, implementation and technical effects of the present invention are described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 is a functional block diagram of a conventional electronic device;
[0011] Figure 2 is a functional block diagram of an embodiment of an electronic device of the present invention;
[0012] Figure 3 A timing diagram showing an example of digital data based on the IEEE 802.3 standard; and
[0013] Figure 4 It is a flow chart of an embodiment of the method for interrupting transmission and reception of the present invention.
[0014] Explanation of symbols
[0015] 100, 200 Electronic devices
[0016] 110, 210 main chips
[0017] 120, 220 slave chips
[0018] 116, 122 Interrupt pins
[0019] 118, 124, 218, 224 data pins
[0020] 119, 126, 219, 226 control pins
[0021] 112, 212 control circuit
[0022] 114 Bus
[0023] 211 Functional Circuit
[0024] 213 Data cable
[0025] 214 Intra-band bus
[0026] 215 Decoder
[0027] 221 Interrupt Source
[0028] 222 Encoder
[0029] 310 Idle control character
[0030] 320 Interrupt information
[0031] Steps S410 to S480 DETAILED DESCRIPTION
[0032] The technical terms used in the following descriptions refer to the customary terms in the technical field. If some terms are explained or defined in this specification, the interpretation of these terms shall be based on the explanation or definition in this specification.
[0033] The disclosure of the present invention includes an electronic device, a network switch, and an interrupt transmission and reception method. Since some of the components included in the electronic device and the network switch of the present invention may be known components individually, the details of the known components will be omitted in the following description without affecting the full disclosure and feasibility of the device invention. In addition, part or all of the process of the interrupt transmission and reception method of the present invention may be in the form of software and / or firmware, and may be executed by the electronic device, the network switch or its equivalent device of the present invention. Without affecting the full disclosure and feasibility of the method invention, the following description of the method invention will focus on the step content rather than the hardware.
[0034] Figure 2 2 is a functional block diagram of an embodiment of an electronic device of the present invention. The electronic device 200 includes a main chip 210 and a plurality of slave chips 220. The main chip 210 includes a functional circuit 211, a control circuit 212, a plurality of decoders 215, a plurality of data pins 218 and a control pin 219. The control circuit 212 can be a circuit or an electronic component with program execution capability, such as a central processing unit, a microprocessor or a microprocessing unit. Each slave chip 220 includes an interrupt source 221, an encoder 222, a data pin 224 and a control pin 226. Each slave chip 220 is coupled to a corresponding decoder 215 via a data pin 224 and a data pin 218.
[0035] Figure 3 yes Figure 2 FIG. 1 is a timing diagram of an example of digital data transmitted from the slave chip 220 to the master chip 210. FIG. Figure 3 Taking the IEEE802.3 standard as an example, Table 1 shows Figure 3 The meaning of each symbol in the figure, the symbols more relevant to the present invention will be described in detail in the following description, and other symbols are well known to those skilled in the art, so they will not be described in detail.
[0036] Table 1:
[0037] symbol meaning IDLE Idle control character S Start control character Dp Preamble data octec SFD Start of frame delimiter DAT Data fragment T Terminate control character INT Interrupt information
[0038] The IEEE802.3 standard uses four 8-bit data channels TXD (TXD<7:0>, TXD<15:8>, TXD<23:16>, and TXD<31:24>) to transmit data, and uses a 4-bit auxiliary channel TXC to indicate the content transmitted by the data channel TXD. For example, the auxiliary channel TXC and the first data channel TXD can use the following content to indicate that a certain segment of the first data channel TXD (i.e., TXD<7:0>) is idle (i.e., does not carry any pending or meaningful data): TXC <0> =12, TXD<7:0>=00001112. According to the IEEE802.3 standard, even if the system using this standard is very busy, there is still an idle interval between data segments DAT (i.e., the segment indicated by the idle control character IDLE). In other words, there is also a data segment DAT before the idle control character 310 (not shown in the figure), and there is also a data segment DAT after the interrupt information 320 (not shown in the figure). In the IEEE802.3 standard, the idle interval can also be called the interframe gap.
[0039] Figure 4 Flow chart of an embodiment of the method for interrupting transmission and reception of the present invention. Figure 2 to Figure 4 .
[0040] Step S410: The slave chip 220 operates according to the clock TX_CLK and generates a plurality of data segments, and the data segments include idle intervals. When the electronic device 200 is a network switch implementing the IEEE802.3 standard, the slave chip 220 can be a port physical layer (PHY) chip, a data segment can be regarded as a packet or a frame, and the data transmission between the main chip 210 and the slave chip 220 can be based on the 10GBASE-R configuration. The details of the 10GBASE-R configuration can be referred to the IEEE802.3 standard.
[0041] Step S420: The slave chip 220 detects an interrupt event, and when an interrupt event occurs, the slave chip 220 places the interrupt information in the idle interval; in other words, the slave chip 220 uses the idle interval to transmit the interrupt information. The interrupt information can be placed in the idle interval of any data channel TXD; in other words, the interrupt information can be carried by the idle interval of any data channel TXD. As long as the main chip 210 receives the interrupt information from any data channel TXD, it can be known that an interrupt event has occurred. Because the data pin 218 and the data pin 224 are one-to-one, the main chip 210 can determine which slave chip 220 generated the interrupt information from the data pin 218. In addition, in some embodiments, the interrupt information can include the interrupt source. For example, Table 2 shows an implementation example of the interrupt information.
[0042] Table 2:
[0043]
[0044]
[0045] In Table 2, (n,k) can be one of (0,0), (1,8), (2,16) and (3,24). For example, when the received TXD<k+7:k> When it is equal to 010000002, the master chip 210 only knows that an interrupt has occurred, but does not know the type of the interrupt event (e.g., interrupt event 1, interrupt event 2, interrupt event 3, ...); in this case, the control circuit 212 can read the interrupt source 221 (e.g., the temporary value of the register) from the slave chip 220 that transmits the interrupt information through the control pin 219 and the control pin 226. For example, when the received TXD<k+7:k> When it is equal to 010000102, the main chip 210 can not only know that an interrupt event has occurred, but the control circuit 212 of the main chip 210 can also immediately know the type of the interrupt event (i.e., interrupt event 2) without accessing the interrupt source 221 of the slave chip 220 through the control pin 219. For a network switch, an interrupt event may be a link change or a speed change, and the control pin 219 and the control pin 226 can communicate based on a register access interface (such as management data control (MDC) and management data input / output (MDIO)).
[0046] Step S430: The slave chip 220 encodes the data segments and the interrupt information to generate digital data using the encoder 222. When the electronic device 200 is a network switch implementing the IEEE802.3 standard, the encoder 222 encodes according to the IEEE802.3 standard (eg, 10GBASE-R encoding) to generate serial digital data.
[0047] Step S440 : The slave chip 220 transmits the digital data to the master chip 210 via the data pin 224 .
[0048] Step S450 : the main chip 210 receives digital data through the data pin 218 .
[0049] Step S460: The main chip 210 uses the decoder 215 to decode the digital data to obtain data segments and interrupt information. When the electronic device 200 is a network switch implementing the IEEE802.3 standard, the decoder 215 can perform decoding according to the IEEE802.3 standard (e.g., 10GBASE-R decoding). After the decoding is completed, the functional circuit 211 obtains and processes the data segments through the data line 213, and the control circuit 212 obtains the interrupt information through the in-band bus 214. For example, when the electronic device 200 is a network switch, the data line 213 can be a Media Independent Interface (MII), and the functional circuit 211 is a packet processing circuit responsible for processing packets or frames, and forwarding the packets or frames according to the content of the packets or frames.
[0050] Step S470: The main chip 210 learns the interrupt source from the content of the interrupt information. When the interrupt information includes the interrupt source, the control circuit 212 of the main chip 210 can learn the interrupt source from the content of the interrupt information without accessing the slave chip 220 through the control pin 219, thereby reducing the burden of the control circuit 212 and the main chip 210.
[0051] Step S480: The main chip 210 processes the interrupt. More specifically, when the interrupt information includes the interrupt source, the control circuit 212 directly operates according to the interrupt event indicated by the interrupt source; when the interrupt information does not include the interrupt source, the control circuit 212 first obtains the interrupt source from the slave chip 220, and then operates according to the interrupt event indicated by the interrupt source.
[0052] In summary, since the interrupt information is not transmitted between the main chip 210 and the slave chip 220 of the electronic device 200 through a dedicated interrupt pin, the cost (i.e., the number of pins) and the complexity of the wiring on the circuit board can be reduced. Furthermore, since the interrupt information can carry the interrupt source, the operating burden of the control circuit 212 of the main chip 210 can be reduced, making the operation of the main chip 210 more efficient.
[0053] In other embodiments, the electronic device 200 is a digital television, the slave chip 220 may be a panel control chip, and the functional circuit 211 may be an audio and video processing circuit for processing audio and video data. The panel control chip and the main chip 210 transmit audio and video data via the internal DisplayPort (iDP) standard, and the encoder 222 and the decoder 215 encode and decode the audio and video data respectively according to the iDP standard (e.g., 8B / 10B coding). Because according to the iDP standard, there is also a reserved idle interval between audio and video data, the audio and video data and interrupt information can be transmitted (i.e., transmitted via the data pin 224) or received (i.e., received via the data pin 218) via the same pin. In this embodiment, the signal transmission between the control pin 219 and the control pin 226 may be an Inter-Integrated Circuit (IC) bus. 2 C) The iDP standard is well known to those skilled in the art, so it will not be described in detail.
[0054] In summary, by utilizing the gap or idle interval of data transmission to transmit interrupt information (which may or may not include the interrupt source), the present invention can save the interrupt pin without causing additional burden on the system. In addition, when the interrupt information includes the interrupt source, the burden of the control circuit for processing the interrupt can also be reduced.
[0055] Since those skilled in the art can understand the implementation details and variations of the method invention disclosed in the present invention through the disclosure of the device invention disclosed in the present invention, in order to avoid redundancy, repeated descriptions are omitted here without affecting the disclosure requirements and feasibility of the method invention. Please note that in the aforementioned figures, the shapes, sizes, proportions, and order of steps of the components are only for illustration, and are for the purpose of helping those skilled in the art to understand the present invention, and are not intended to limit the present invention. Furthermore, although the aforementioned embodiments take network switches and digital televisions as examples, this is not a limitation of the present invention, and those skilled in the art can appropriately apply the present invention to other types of electronic devices based on the disclosure of the present invention.
[0056] Although the embodiments of the present invention are described above, the embodiments are not intended to limit the present invention. Those skilled in the art may make changes to the technical features of the present invention based on the explicit or implicit contents of the present invention. All these changes may fall within the scope of patent protection sought by the present invention. In other words, the scope of patent protection of the present invention shall be subject to that defined by the claims of this specification.
Claims
1. An electronic device, comprising: a slave chip for generating a plurality of data segments and at least one interruption information, and comprising an encoder for encoding the plurality of data segments and the interruption information to generate digital data, wherein the interruption information is located in an idle interval between the plurality of data segments, and the idle interval is indicated by an idle control character; and A master chip, coupled to the slave chip, for receiving the digital data, and comprising: a decoder, used for decoding the digital data to obtain the plurality of data segments and the interruption information; and A control circuit is coupled to the decoder and is used for processing the interrupt information. 2 . The electronic device as claimed in claim 1 , wherein the interrupt information comprises an interrupt source for indicating an interrupt event.
3. The electronic device of claim 1, wherein the electronic device is a network switch, the slave chip is a port physical layer chip, the data segments are a plurality of packets, and the master chip further comprises: A packet processing circuit is coupled to the decoder and is used for processing and forwarding the plurality of packets.
4. The electronic device as claimed in claim 1, wherein the electronic device is a digital television, the slave chip is a panel control chip, the data segments are a plurality of audio and video data, and the master chip further comprises: A video and audio processing circuit is coupled to the decoder and is used for processing the plurality of video and audio data.
5. The electronic device as claimed in claim 1, wherein the main chip further comprises: An intra-frequency bus is coupled between the decoder and the control circuit and is used to transmit the interrupt information.
6. An interrupt transmission and reception method, applied to an electronic device, the electronic device comprising a slave chip and a master chip, the slave chip comprising a first data pin and the master chip comprising a second data pin, the method comprising: The slave chip generates a plurality of data segments, wherein there is an idle interval between the plurality of data segments, and the idle interval is indicated by an idle control character; The slave chip detects an interrupt event, and places an interrupt message in the idle interval when the interrupt event occurs; The slave chip encodes the plurality of data segments and the interrupt information to generate digital data; The slave chip transmits the digital data via the first data pin; The main chip receives the digital data through the second data pin; The main chip decodes the digital data to obtain the interrupt information; and Handle the interrupt event. 7 . The method of claim 6 , wherein the interrupt information comprises an interrupt source for indicating the interrupt event.
8. A network switch, comprising: A port physical layer chip includes a first data pin and an encoder, which is used to: Generate multiple packets; Detecting an interrupt event to generate an interrupt message; placing the interrupt information in an idle interval between the plurality of packets, wherein the idle interval is indicated by an idle control character; encoding the plurality of packets and the interrupt information using the encoder to generate digital data; and transmitting the digital data via the first data pin; and A main chip includes a second data pin and a decoder, and is coupled to the port physical layer chip through the first data pin and the second data pin, for: receiving the digital data via the second data pin; Decoding the digital data using the decoder to obtain the plurality of packets and the interrupt information; and Handle the interrupt event. 9 . The network switch as claimed in claim 8 , wherein the interrupt information comprises an interrupt source for indicating the interrupt event.
10. The network switch as claimed in claim 8, wherein the main chip further comprises: a control circuit, coupled to the decoder, for processing the interrupt information; and An intra-frequency bus is coupled between the decoder and the control circuit and is used to transmit the interrupt information.
