Embodiments of the inventive subject matter generally relate to the field of electrical component communication systems and software, and, more particularly, to a profile-driven electrical component communication mechanism.
Computer systems employ bus architectures that communicate with circuit boards and electrical components in accordance with communication protocols. For example, at the component level, the System Management Bus (SMBus) protocol defines a communication protocol for a two-wire bus architecture, based upon the Inter-Integrated Circuit (I2C) interface specification, that is used for system management communications with electrical components of computer systems. The Power Management Bus (PMBus) protocol defines a communications protocol for digital power management communications. The PMBus protocol enhances the communication capabilities with respect to electrical components of digital power subsystems, e.g., power converters.
The present embodiments may be better understood, and numerous objects, features, and advantages made apparent to those skilled in the art by referencing the accompanying drawings.
The description that follows includes exemplary systems, methods, techniques, instruction sequences and computer program products that embody techniques of the present inventive subject matter. However, it is understood that the described embodiments may be practiced without these specific details. For instance, although examples refer to implementing profile-driven electrical component communication in systems according to the SMBus protocol and the PMBus protocol, in other embodiments profile-driven electrical component communication may be implemented in systems implementing other protocols (e.g., in accordance with the Smart Battery System specification). In other instances, well-known instruction instances, protocols, structures and techniques have not been shown in detail in order not to obfuscate the description.
Although protocol specifications (e.g., a PMBus specification) provide a framework for implementing a protocol, some specifications have loose implementation requirements. For instance, a specification may require a conforming device to implement a particular command without providing specific details about formatting for the command. Although greater flexibility can foster wider adoption of the specification, greater flexibility can also lead to a lack of uniformity and predictability across implementations of the specification. A profile-driven electrical component command interface allows a system to handle commands across devices that implement a specification differently. The profile-driven electrical component command interface handles electrical component command invocations for different electrical components (e.g., temperature sensor, power converter, accelerometer, gyros, etc.). The profile-driven electrical component command interface determines if an electrical component targeted by a command invocation supports the invoked command according to a profile for the targeted electrical component. The profile-driven electrical component command interface then performs the invoked command in accordance with an implementation definition provided in the targeted electrical component profile.
The profile-driven electrical component command interface 100 comprises a profile-look-up unit 103, a command/result message generator 107, and a component command library 109. The profile-driven electrical component command interface 100 fields an invocation of a command that target electrical components. The commands are invoked to perform various types of operations with respect to the electrical components, such as voltage control operations (e.g., read output voltage, set voltage thresholds, etc.), temperature control operation (e.g., read temperature, set temperature thresholds, etc.), fan control operations (e.g., read fan settings, set fan settings, etc.), read electronic component manufacturer information (e.g., read part number, read manufacturer identification number), among others. The profile look-up unit 103 determines if one or more profiles are associated with the targeted electrical component, and loads and/or reads the one or more associated profiles. The command/result message generator 107 generates command messages and result messages. The command/result message generator 107 generates a command message based, at least in part, on the command in the component command library 109 that corresponds to an invoked command. In addition, the message generator 107 generates the command message in accordance with the associated one or more profiles. For instance, one or more values to be written by the invoked command are formatted in accordance with an implementation definition in the one or more associated profiles. The message generator 107 can also generate a result message to supply a result of an invoked command to an invoking entity.
A plurality of stages in
The profile look-up unit 103 can read an entire profile for the power converter 115 or read the example implementation definition for READ_VOUT from the power converter profile. At a stage C, the command/result message generator 107 generates a command message based upon a READ_VOUT command as provided for in the component command library 109. In the case of the READ_VOUT command, the message generator 107 generates the command message, which is communicated to the power converter 115. Although the command message may be further processed when passing from the profile-driven electrical component command interface 100 to the power converter 115 in the physical layer, such processing is not described to avoid obfuscating the embodiments. When the result of the READ_VOUT command is received from the power converter 115, the message generator 107 interprets the result from the power converter in accordance with the implementation definition for READ_VOUT (i.e., using the slope coefficient and precision as defined in the profile) to provide a result message to the telemetry and control unit 110 with a result that can be understood by the telemetry and control unit 110. Hence, invoking entities (e.g., processes, user level applications, etc.) can invoke a command while being agnostic to the implementation definition of the command for a targeted electrical component. This modularity of electrical component implementation definitions of commands from invokers allows for implementation definitions to be maintained (e.g., adding a new electrical component profile, updating an electrical component profile, removing an electrical component profile, updating a master profile, etc.) independently, thus providing a dynamic and evolving electrical component command interface. Furthermore, the modularity allows a manufacturer to limit visibility of certain information. For instance, if a manufacturer of an electrical component does not want to disclose certain information regarding the electrical component (e.g., register information), then, the manufacturer may create the corresponding profile and store the profile in a memory location specified by the developer instead of having the developer create the corresponding profile.
It should be understood that the conceptual diagram depicted by
At block 203, it is determined if the command is a valid command. For instance, a command name passed as a parameter in the command invocation is evaluated against a list of valid commands. As another example, the profile-driven electrical component command interface determines if a command identifier indicated in the command invocation falls within a ranges of values that correspond to valid commands. If the command is not valid, then control flows to block 207. If the command is valid, then control flows to block 205.
At block 205, it is determined if there is an implementation definition for the command for the electrical component. For instance, it is determined if a profile exists for the electrical component targeted by the command, and if the profile indicates an implementation definition for the command. Embodiments can indicate implementation definitions for commands for electrical components differently, and not necessarily organize command implementation definitions in profiles for each electrical component. For instance, a structure can be maintained that is indexed by a command value (e.g., command name, hash of command name, a command number, etc.). Each entry in the structure has another level of indirection using an indicator for the electrical component, which then references the implementation definition for the command. Embodiments can also maintain multiple structures for fast lookup of commonly invoked commands. For example, a structure of implementation definitions for commonly invoked commands can be maintained separately from profiles. The structure could index the implementation definitions by a hash of an electrical component indicator (e.g., serial number and manufacturer name) and an indicator of the command. If an implementation definition for the command for the electrical component cannot be found, then control flows to block 207. If an implementation definition for the command for the electrical component is found, then control flows to block 206.
At block 206, a command message for the invoked command is generated in accordance with the implementation definition.
At block 209, the command message is caused to be supplied to the electrical component.
At block 211, it is determined if the electrical component returns a result from performing the command indicated in the command message. If a result is returned, then control flows to block 213. If a result is not returned, then the flow ends.
At block 213, the result is interpreted in accordance with the implementation definition. The interpreted result is then supplied to the invoker. The operations for reading a profile, generating a command message, and interpreting results may be realized with one or more executable code units (e.g., function, procedure, routine, etc.). For example, a single executable code unit (e.g., machine code, interpreted code, run-time compiled code, byte code, etc.) may call a first executable code unit to read a profile, a second executable code unit to generate the command message sent to the electrical component, and a third executable code unit to interpret a result. Although the operations are already specified with the executable code units, the operations vary dynamically based on the indicated parameters (e.g., location of profiles, name of command, serial number of electrical component, etc.). From block 213, the flow ends.
If the command was determined to be invalid at block 203 or the implementation definition was not found at block 205, then an error message is caused to be generated at block 207.
Although
At block 303, a command message for the selected command is generated. For instance, a message is generated to instruct an electrical component to perform one or more operations that implement the selected command.
At block 305, the generated command message is caused to be supplied to an electrical component. A dashed line from block 305 to block 307 represents time until a response to the command message is received from the electrical component. At block 307, a command result is received from the electrical component.
At block 309, a value (or values), to be returned to the invoker (e.g., a telemetry and control unit) is determined based on the received command result and an implementation definition for the read command for the electrical component. For instance, the previously determined implementation definition for the read command for the electrical component indicates the following:
Where:
At block 311, the result message with the determined value is generated, and the generated message is caused to be supplied to the invoker.
At block 403, a write command message for the selected command is generated. For instance, a message is generated to instruct an electrical component to perform one or more operations that implement the selected write command.
At block 405, a value (or values) to be written (e.g., a voltage threshold value) in accordance with the selected write command is interpreted in accordance with an implementation definition for the write command for an electrical component. To illustrate, the implementation definition for an electrical component may indicate the following:
Y=(mX+b)*10R
Where:
Y, the formatted write data to be sent to the electrical component, is a two byte, two's complement integer;
At block 407, the interpreted value is used in the write command message. For instance, a parameter or field is populated with the determined Y write data.
At block 409, the generated command message is caused to be supplied to an electrical component.
It should be understood that the depicted flow diagrams are examples meant to aid in understanding embodiments and should not be used to limit embodiments or limit scope of the claims. Embodiments may perform additional operations, fewer operations, operations in a different order, operations in parallel, and some operations differently. For instance, in
Furthermore, the operations that describe generating a command message should not be used to limit embodiments and/or claim scope. Causing an electrical component to perform operations can be described in various manners based on perspective (e.g., perspective of the telemetry and control unit versus the perspective of the electrical component). Although the same operations are being performed by the electrical component, causing the electrical component to perform those operations can be described as sending a command message to the electrical component, as done in the illustrations. Causing the electrical component to perform those operations can also be described as executing a command, instantiating a command, etc.
Embodiments 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, embodiments may take the form of a computer program product embodied in any tangible medium of expression having computer usable program code embodied in the medium. The described embodiments may be provided as a computer program product, or software, that may include a machine-readable medium having stored thereon instructions, which may be used to program a computer system (or other electronic device(s)) to perform a process according to embodiments, whether presently described or not, since every conceivable variation is not enumerated herein. A machine readable medium includes any mechanism for storing or transmitting information in a form (e.g., software, processing application) readable by a machine (e.g., a computer). The machine-readable medium may include, but is not limited to, magnetic storage medium (e.g., floppy diskette); optical storage medium (e.g., CD-ROM); magneto-optical storage medium; read only memory (ROM); random access memory (RAM); erasable programmable memory (e.g., EPROM and EEPROM); flash memory; or other types of medium suitable for storing electronic instructions. In addition, embodiments may be embodied in an electrical, optical, acoustical or other form of propagated signal (e.g., carrier waves, infrared signals, digital signals, etc.), or wireline, wireless, or other communications medium.
Computer program code for carrying out operations of the embodiments may be written in any combination of one or more programming languages, including an object oriented programming language (e.g., Java, Smalltalk, C++, etc.) and conventional procedural programming languages (e.g., “C” programming language). The program code may execute entirely on a 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), a personal area network (PAN), 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).
In one embodiment, the memory unit 530 embodies the profile-driven electrical component command interface 532. The profile-driven electrical component command interface 532 may be implemented in computer system 500 for communicating with a plurality of electrical components, as described above with reference to
While the embodiments are described with reference to various implementations and exploitations, it will be understood that these embodiments are illustrative and that the scope of the inventive subject matter is not limited to them. In general, techniques for profile-driven electrical component communication as described herein may be implemented with facilities consistent with any hardware system or hardware systems. For instance, example systems depicted with a single bus are illustrative and not intended to limit embodiments. A system may include multiple buses, each of which being coupled with one or more electrical components. A system can send a profile-driven electrical component communication to an electrical component on any one of the multiple buses. A system can transmit a profile-driven electrical component communication across multiple buses to a plurality of same or similar electrical components coupled to different ones of the multiple buses. Many variations, modifications, additions, and improvements are possible.
Plural instances may be provided for components, operations or structures described herein as a single instance. Finally, boundaries between various components, operations and data stores are somewhat arbitrary, and particular operations are illustrated in the context of specific illustrative configurations. Other allocations of functionality are envisioned and may fall within the scope of the inventive subject matter. In general, structures and functionality presented as separate components in the exemplary configurations may be implemented as a combined structure or component. Similarly, structures and functionality presented as a single component may be implemented as separate components. These and other variations, modifications, additions, and improvements may fall within the scope of the inventive subject matter.