Field of the Invention
The field of the invention is data processing, or, more specifically, methods, circuits, and products for dynamically optimizing bus frequency of an Inter-Integrated Circuit (‘I2C’) bus.
Description of Related Art
The Inter-Integrated Circuit (‘I2C’) data communications interface and protocol is used widely throughout computing and electronic systems for various reasons including the robustness and stability of the protocol. The protocol, however, does have a few limitations. Like most electrical interfaces, devices employing I2C may be required to meet certain signal-integrity metrics to operate properly. Most notably, in I2C, is the rise time which the bus must meet. Because the bus is an open drain bus, meaning no active drivers, loading the bus with more devices generates a design concern as the rise time of the bus will be adversely impacted. Designers are often trying to balance the need for bandwidth of the bus versus a required rise time, such as that defined in the I2C specification. Usually, one bus speed does not fit all applications. To date, there is no I2C capable of dynamically finding an optimal clock frequency, based on bus load.
Methods, circuits, and computer program products for dynamically optimizing bus frequency of an Inter-Integrated Circuit (‘I2C’) bus are disclosed in this specification. The bus includes a plurality of signal lines coupling a master node and one or more slave nodes for data communications. At least one of the signal lines is coupled to a rise time detection circuit. The rise time detection circuit is configured to monitor a voltage of the signal line, where the voltage alternates between a logic low voltage and a logic high voltage. The rise time detection circuit is also operatively coupled to the master node for adjusting frequency of the I2C bus. Dynamically optimizing bus frequency of an I2C bus in accordance with embodiments of the present invention includes: setting, by the rise time detection circuit, the I2C bus frequency to a predetermined frequency; detecting, by the rise time detection circuit, a first voltage on the signal line, the first voltage being greater than the logic low voltage; starting, by the rise time detection circuit responsive to the detection of the first voltage, an automatically incrementing counter, the counter incrementing once for each clock period of the rise time detection circuit; detecting, by the rise time detection circuit, a second voltage on the signal line, the second voltage greater than the first voltage and less than the logic high voltage; stopping, by the rise time detection circuit responsive to the detection of the second voltage, the automatically incrementing counter; calculating, in dependence upon the clock period of the rise time detection circuit and the value of the counter, a rise time for the signal line; determining, by the rise time detection circuit, whether the calculated rise time is greater than a predetermined maximum threshold; and if the calculated rise time is greater than the predetermined maximum threshold, increasing, by the rise time detection circuit through the master node, the I2C bus frequency.
The foregoing and other objects, features and advantages of the invention will be apparent from the following more particular descriptions of exemplary embodiments of the invention as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts of exemplary embodiments of the invention.
Exemplary methods, apparatus, and products for dynamically optimizing bus frequency of an I2C bus in accordance with the present invention are described with reference to the accompanying drawings, beginning with
The example computer (152) of
The example I2C bus (106) of
The rise time detection circuit (102) in the example of
The rise time detection circuit (102) then detects, by, a first voltage on the signal line of the I2C bus. The first voltage has a greater value than the logic low voltage. In some embodiments, the first voltage is 0.7 volts. Responsive to the detection of the first voltage the rise time detection circuit (102) starts an automatically incrementing counter (130). The counter (130) increments once for each clock period of the rise time detection circuit (102). The rise time detection circuit (102) then detects a second voltage on the signal line. The second voltage is greater than the first voltage and less than the logic high voltage. In some embodiments the second voltage is 2 volts. Responsive to the detection of the second voltage, the rise time detection circuit (102) then stops the automatically incrementing counter. The rise time detection circuit then calculates a rise time for the signal line in dependence upon the clock period of the rise time detection circuit and the value of the counter. The rise time detection circuit (102) determines whether the calculated rise time is greater than a predetermined maximum threshold (128). If the calculated rise time is greater than the predetermined maximum threshold, the rise time detection circuit increases, through the master node (104), the I2C bus (106) frequency. The rise time detection circuit (102) may be configured to iteratively carry out this process until the calculated rise time is not greater than the predetermined maximum threshold. At that time, the rise time detection circuit has set the I2C bus (106) to an optimal bus frequency.
Although the rise time detection circuit (102) is depicted in the example of
Stored in RAM (168) is an application (114), a module of computer program instructions that carries out user-level data processing tasks. Examples of such applications may include server applications, web browsers, word processing applications, media library and playback applications, presentation applications, and so on as will occur to readers of skill in the art. Also stored in RAM (168) is an operating system (154). Operating systems useful in systems that dynamically optimize bus frequency of an I2C bus according to embodiments of the present invention include UNIX™, Linux™, Microsoft XP™, AIX™, IBM's i5/OS™, and others as will occur to those of skill in the art. The operating system (154) and application (114) in the example of
The computer (152) of
The example computer (152) of
The exemplary computer (152) of
The arrangement of computers and other devices making up the exemplary system illustrated in
For further explanation,
In the example of
Responsive to the detection of the first voltage, the rise time detection circuit (102) starts an automatically incrementing counter (130). The counter increments once for each clock (218) period of the rise time detection circuit. The period of the clock (218) of the rise time detection circuit (102) is less than the rise time of the I2C signal line.
The rise time detection circuit (102) then detects a second voltage (2V) in this example) on the signal line (204 or 206). The second voltage is greater than the first voltage and less than the logic high voltage. Responsive to the detection of the second voltage, the rise time detection circuit (102) stops the automatically incrementing counter (130).
The rise time detection circuit (102) then calculates, in dependence upon the clock period of the rise time detection circuit and the value of the counter, a rise time for the signal line. The rise time detection circuit (102) may calculate such a rise time by calculating the product of the clock (218) period of the rise time detection circuit (102) and the value of the counter.
The rise time detection circuit (102) then determines whether the calculated rise time is greater than a predetermined maximum threshold (128). The predetermined maximum threshold represents a minimum acceptable rise time for an I2C signal. If the calculated rise time is greater than the predetermined maximum threshold, the rise time detection circuit (102) through the master node (104) increases the I2C bus frequency.
For further explanation,
In the example of
As the I2C signal (204, 206) continues to rise, the rise time detection circuit (102) detects a second voltage (230) of 2V on the signal line. Responsive to the detection of the second voltage (230), the rise time detection circuit (102) stops (224) the automatically incrementing counter, again through use of the counter enable signal (216).
The rise time detection circuit (102) then calculates a rise time for the signal line (204, 206) in dependence upon the period of the clock signal (228) and the value of the counter. In the example of
The rise time detection circuit (102) then determines whether the calculated rise time is greater than a predetermined maximum threshold. If the calculated rise time is greater than the predetermined maximum threshold, the rise time detection circuit (102) through the master node (104) increases the I2C bus frequency.
For further explanation,
The method of
The method of
The method of
The method of
The method of
The method of
The method of
Determining (314) whether the calculated rise time is greater than a predetermined maximum threshold may be carried out by comparing the values of the calculated rise time and the predetermined maximum threshold. If the calculated rise time is not greater than the predetermined maximum threshold, then the optimal I2C bus frequency has been identified (322) and set. If the calculated rise time is greater than the predetermined maximum threshold, the method of
In the method of
For further explanation,
The method of
In another embodiment, increasing (316) the I2C bus frequency is carried out by increasing (404) the I2C bus frequency a predetermined amount in dependence upon the difference between the calculated rise time and the predetermined maximum threshold. In this embodiment, for example, the rise time detection circuit may increase (404) the bus frequency 1 Khz when the difference between the calculated rise time and the predetermined maximum threshold falls within a range of 1-20 ns, 10 Khz when the difference between the calculated rise time and the predetermined maximum threshold falls within a range of 21-30 ns, and 40 Khz when the difference between the calculated rise time and the predetermined maximum threshold falls within a range of 31-60 ns.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.
Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
Aspects of the present invention are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It will be understood from the foregoing description that modifications and changes may be made in various embodiments of the present invention without departing from its true spirit. The descriptions in this specification are for purposes of illustration only and are not to be construed in a limiting sense. The scope of the present invention is limited only by the language of the following claims.
This application is a continuation application of and claims priority from U.S. patent application Ser. No. 13/467,332, filed on May 9, 2012.
Number | Name | Date | Kind |
---|---|---|---|
3519849 | Tyler | Jul 1970 | A |
4421995 | Gottschalk | Dec 1983 | A |
6377640 | Trans | Apr 2002 | B2 |
6404248 | Yoneda | Jun 2002 | B1 |
7403584 | Koenenkamp | Jul 2008 | B2 |
7535933 | Zerbe et al. | May 2009 | B2 |
7606955 | Falik et al. | Oct 2009 | B1 |
7643954 | Cleitus et al. | Jan 2010 | B2 |
7987382 | Badaroglu | Jul 2011 | B2 |
8370536 | Bohm | Feb 2013 | B2 |
8575755 | Christman et al. | Nov 2013 | B1 |
8959380 | Decesaris | Feb 2015 | B2 |
20020172304 | Saze et al. | Nov 2002 | A1 |
20090049277 | Muranishi | Feb 2009 | A1 |
20100054383 | Mobin et al. | Mar 2010 | A1 |
20100117691 | Lory et al. | May 2010 | A1 |
20100122002 | Lory et al. | May 2010 | A1 |
Number | Date | Country |
---|---|---|
101782885 | Jul 2010 | CN |
2011009849 | Jan 2011 | JP |
Entry |
---|
Structured Somputer Organization Third edition Andrew S Tanenbaum, 1990 pp. 11-13. |
Disclosed Anonymously, (Aug. 2011), “Method for Bi-Directional Communication Using I2c Buses”, IP.com Prior Art Database, 6 pp., IP.com, No. IPCOM000209388D. |
Disclosed Anonymously, (Dec. 2004), “Method for a Low Offset Rise Time Measurement”, IP.com Prior Art Database, 4 pp., Ip.com, No. IPCOM00033810D. |
NXP Semiconductors, “I2C Maximum Clock Speed Calculator”, www.nxp.com [online] Mar. 2009 [accessed online Apr. 16, 2012], pp. 1-27, URL: http://ics.nxp.com/support/documents/interface/pdf/i2c.clock.speed.calculatorpdf. |
Number | Date | Country | |
---|---|---|---|
20150127963 A1 | May 2015 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 13467332 | May 2012 | US |
Child | 14592000 | US |