This application claims all benefits accruing under 35 U.S.C. §119 from China Patent Application No. 201210511262.5, filed on Dec. 4, 2012 in the State Intellectual Property Office of China. The contents of the China Application are hereby incorporated by reference. In addition, subject matter relevant to this application is disclosed in: co-pending U.S. patent application entitled “APPARATUS AND METHOD FOR MONITORING SIGNALS TRANSMITTED IN BUS,” Attorney Docket Number US48035, application Ser. No. [to be advised], filed on the same day as the present application. This application and the co-pending U.S. patent applications are commonly owned, and the contents of the co-pending U.S. patent applications are hereby incorporated by reference.
1. Technical Field
The disclosure generally relates to data communication, and particularly relates to apparatuses and methods for monitoring real-time signals transmitted in a bus.
2. Description of Related Art
For serial data communication between multiple devices, the Inter-Integrated Circuit (I2C) bus and the Serial Peripheral Interface (SPI) bus have been developed and widely accepted in the consumer electronics, telecommunications and industrial electronics fields. However, it is difficult to acquire the status of real-time signals transmitted in the I2C bus or the SPI bus.
Therefore, there is room for improvement within the art.
Many aspects of the embodiments can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the embodiments. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the views.
The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings, in which like reference numerals indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references can mean “at least one.”
In general, the word “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language such as Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an erasable-programmable read-only memory (EPROM). The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media are compact discs (CDs), digital versatile discs (DVDs), Blu-Ray discs, Flash memory, and hard disk drives.
The master device 10 is connected to the slave device 20 via a bus, for example, an I2C bus or a SPI bus. An I2C bus includes a Serial Data (SDA) line and a Serial Clock (SCL) line. An SPI bus includes a Master-Out-Slave-In (MOSI) line, a Master-In-Slave-Out (MISO) line, a Serial Clock (SCL) line, and a Slave Select (SS) line. The master device 10 and the slave device 20 can exchange data via the bus.
The signal probe 50 is electrically connected to the bus that interconnects the master device 10 the slave device 20. The signal monitor 30 is connected to the bus through the signal probe 50. The signal monitor 30 collects real-time signals transmitted in the bus, through the signal probe 50. In some embodiments, the signal probe 50 includes a unidirectional transmission module (not shown) which prevents any signal from being transmitted or fed back from the signal monitor 30 to the bus. Thus, the signal monitor 50 is prevented from damaging signals transmitted in the bus.
When the signal monitor 30 collects real-time signals transmitted in the bus, the signal monitor 30 can examine the real-time signals and report the status of the real-time signals to the control terminal 40.
The control terminal 10 provides a user interface for displaying the status of the real-time signals transmitted in the bus. The control terminal 10 may be a personal computer, a server computer, a tablet computer, or the like.
The signal collecting unit 301 collects the real-time signals transmitted in the bus through the signal probe 50 and converts the collected real-time signals into accessible data according the protocol of the bus, for example, the I2C bus protocol or the SPI bus protocol. The signal connecting unit 301 transmits the accessible data to the first multiplexer 302.
The first multiplexer 302 selectively stores the accessible data in the first register 304 and the second register 305. In some embodiments, each of the first register 304 and the second register 305 is a First Input First Output (FIFO) register. Thus, the accessible data which is firstly stored in the first register 304 or the second register 305 can be read firstly from the first register 304 or the second register 305.
The processing unit 307 transmits a read command to the second multiplexer 303. In response to the read command, the second multiplexer 303 selectively reads the accessible data in the first register 304 and the second register 305. The second multiplexer 303 transmits the accessible data to the processing unit 307.
When the first register 304 is full, the first register 304 sends an out-of-space signal to the data W/R controller 306. In response to the out-of-space signal from the first register 304, the data W/R controller 306 sets the first register 304 to a write-protected state and informs the first multiplexer 302 and the second multiplexer 303 that the first register 304 is full. The first multiplexer 302 then selects for storage purposes the second register 305 and stores the accessible data in the second register 305. The second multiplexer 303 selects the first register 304 and reads accessible data from the first register 304. When the second multiplexer 303 has finished reading the accessible data from the first register 304, the data W/R controller 306 sets the first register 304 to a write-permitted state. Then the first multiplexer 302 then can again select the first register 304 for storage of subsequent accessible data.
Similarly, when the second register 305 is full, the second register 305 sends an out-of-space signal to the data W/R controller 306. In response to the out-of-space signal from the second register 305, the data W/R controller 306 sets the second register 305 to a write-protected state and informs the first multiplexer 302 and the second multiplexer 303 that the second register 305 is full. The first multiplexer 302 selects the first register 304 for storage of accessible data. The second multiplexer 303 selects the second register 305 and reads accessible data from the second register 305. When the second multiplexer 303 has finished reading the accessible data from the second register 305, the data W/R controller 306 sets the second register 305 to a write-permitted state. Then the first multiplexer 302 then can again select the second register 305 for storage of subsequent accessible data.
When both of the first register 304 and the second register 305 are full, the first multiplexer 302 suspends the accessible data transmitted from the signal collecting unit 301 and the signal collecting unit 301 suspends collecting real-time signals from the bus, until either of the first register 304 and the second register 305 is again set to the write-permitted state.
When both of the first register 304 and the second register 305 are full, the second multiplexer 303 may select any of the first register 304 and the second register 305 and read the accessible data from either of the first register 304 and the second register 305.
When both of the first register 304 and the second register 305 are in the write-permitted state, the second multiplexer 303 enters a standby state and suspends reading data from any of the first register 304 and the second register 305, until either of the first register 304 and the second register 305 is full.
When the processing unit 307 receives the accessible data from the second multiplexer 303, the processing unit 307 determines status of the real-time signals transmitted in the bus by examining the accessible data. The processing unit 307 then transmits the status of the real-time signals to the UART 308.
The UART 308 asynchronously transmits the status of the real-time signals to the wireless network interface 309.
The wireless network interface 309 establishes a wireless connection with the control terminal 40 and transmits the status of the real-time signals to the control terminal 40 via the wireless connection.
The indicating lamp 310 indicates the working status of the signal monitor 30. While the processing unit 307 is examining the accessible data, the processing unit 307 controls the indicating lamp 310 to flicker.
The communication interface 401 establishes a wireless connection with the wireless network interface 309 of the signal monitor 30 and receives the status of the real-time signals from the signal monitor 30 via the wireless connection. The communication interface 401 transmits the status of the real-time signals to the processor 402. The processor 402 stores the status of the real-time signals in the storage device 403.
In step S401, the signal collecting unit 301 collects real-time signals from a bus through the signal probe 50.
In step S402, the signal collecting unit 301 converts the real-time signals into accessible data according to the protocol of the bus.
In step S403, the signal collecting unit 301 transmits the accessible data to the first multiplexer 302.
In step S404, the first multiplexer 302 selectively stores the accessible data in the first register 304 and the second register 305.
In step S405, the processing unit 307 transmits a read command to the second multiplexer 303.
In step S406, in response to the read command, the second multiplexer 303 selectively reads the accessible data from the first register 304 and the second register 305.
In step S407, the second multiplexer 303 transmits the accessible data to the processing unit 307.
In step S408, the processing unit 307 determines status of the real-time signals transmitted in the bus by examining the accessible data.
In step S409, the processing unit 307 transmits the status of the real-time signals to the UART 308.
In step S410, the UART 308 asynchronously transmits the status of the real-time signals to the wireless network interface 309.
In step S411, the wireless network interface 309 establishes a wireless connection with the control terminal 40 and transmits the status of the real-time signals to the control terminal 40 via the wireless connection.
In step S412, the control terminal 10 provides a user interface for displaying the status of the real-time signals.
Although numerous characteristics and advantages have been set forth in the foregoing description of embodiments, together with details of the structures and functions of the embodiments, the disclosure is illustrative only, and changes may be made in detail, especially in the matters of arrangement of parts within the principles of the disclosure to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed.
In particular, depending on the embodiment, certain steps or methods described may be removed, others may be added, and the sequence of steps may be altered. The description and the claims drawn for or in relation to a method may give some indication in reference to certain steps. However, any indication given is only to be viewed for identification purposes, and is not necessarily a suggestion as to an order for the steps.
Number | Date | Country | Kind |
---|---|---|---|
2012105112625 | Dec 2012 | CN | national |