An embedded computer system usually has several busing schemes which are used to transfer data packets and commands between components in the system. Sometimes these systems rely heavily on one primary bus. When an error or lockup occurs on the primary bus, the communication with the components connected to the primary bus is disrupted. In some cases, when an error or lockup occurs on the primary bus, the components connected to the primary bus are disabled.
A system with a redundant bus is complex and often requires a dedicated controller to determine which bus to use at any given time. In this case, the system includes additional hardware which adds to the development and hardware costs of the system. If the computer system is used in an airborne system, the redundant bus adds weight to the payload.
It is desirable to provide a backup serial bus without additional hardware.
A first aspect of the present invention provides a method of sending data packets between a control processor and a plurality of peripheral components comprising retrieving information embedded in a command data packet formatted in a first protocol at a switch adapted to function as an alternate bus, forming a reformatted data packet at the switch, and transferring the reformatted data packet from the switch. The reformatted data packet is formatted according to a second protocol, and includes the retrieved information.
A second aspect of the present invention provides a switch, a bus interface, a bus state machine and ports communicatively coupled to peripheral components. The switch includes a controller interface to receive data packets formatted according to a first protocol from a control processor. The bus interface reformats the received data packets from the first protocol to a second protocol. The bus state machine controls the functionality of the bus interface. The data packets formatted according to the second protocol are transferred to the peripheral components via the ports.
A third aspect of the present invention provides a method of sending data packets between a control processor and peripheral components. The method includes retrieving information embedded in a command data packet formatted according to a first protocol at a switch that functions as an alternative bus. The information includes an address of a peripheral component and data for the peripheral component. The method also includes transferring the address of the peripheral component from the switch in a first SMBus Block Write data packet according to the System Management Bus protocol and transferring the data for the peripheral component from the switch in a second SMBus Block Write data packet that follows the first SMBus Block Write data packet according to the System Management Bus protocol. The first protocol differs from the System Management Bus protocol.
In accordance with common practice, the various described features are not drawn to scale but are drawn to emphasize features relevant to the present invention. Reference characters denote like elements throughout figures and text.
In the following detailed description, reference is made to the accompanying drawings that form a part hereof, and in which is shown by way of illustration specific illustrative embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention, and it is to be understood that other embodiments may be utilized and that logical, mechanical and electrical changes may be made without departing from the scope of the present invention. The following detailed description is, therefore, not to be taken in a limiting sense.
The system 10 includes a control processor 20, a switch 30 and a plurality of peripheral components represented generally by the numeral 55. The control processor 20 is communicatively coupled to the switch 30. The control processor 20 sends data packets to the switch 30 when implementing the alternative bus.
The switch 30 includes a controller interface (I/F) 35, a bus interface (I/F) 36 and the plurality of ports generally represented by ports numbered 40, 41, and 42. The controller interface 35 receives data packets that are formatted according to a first protocol from the control processor 20. The bus interface 36 reformats the received data packets from the first protocol to a second protocol. Each data packet formatted according to the second protocol is transferred to one or more of the plurality of peripheral components 55 via one of the communicatively coupled ports 40, 41 or 42. The bus interface 36 includes a bus state machine 37 that controls the functionality of the bus interface 36 during the reformatting of the data packets.
The plurality of peripheral components 55 comprises subsets 50, 51, and 52 of the plurality of peripheral components 55. The subset 50 of the plurality of peripheral components 55 is communicatively coupled to port 40 of the switch 30. The subset 50 includes peripheral components 60-62. A data packet transferred via port 40 is sent to the peripheral components 60-62.
The subset 51 of the plurality of peripheral components 55 is communicatively coupled to port 41 of the switch 30. The subset 51 includes peripheral components 63-65. A data packet transferred via port 41 is sent to the peripheral components 63-65.
Likewise, the subset 52 of the plurality of peripheral components 55 is communicatively coupled to port 44 of the switch 30. The subset 52 includes peripheral component 66. A data packet transferred via port 42 is sent to the peripheral component 66. In one implementation of this embodiment, the subset 52 includes more than one peripheral component.
In one implementation of this embodiment, the switch 30 includes twelve ports. In another implementation of this embodiment, the switch 30 includes twelve ports and each port is communicatively coupled to five peripheral components.
The peripheral components 60-66 each include one or more internal locations. In the illustrated embodiment, the peripheral component 60 includes internal locations 70, 71 and 72, the peripheral component 63 includes internal locations 80, 81 and 82, and the peripheral component 66 includes internal locations 90, 91 and 92. The internal locations in the peripheral components 61, 62, 64, and 65 are not shown in
A primary bus (not shown) in the system 10 uses an embedded system primary bus architecture to transfer commands and data, between the control processor 20 and the peripheral components 60-66. When the primary bus is locked-up or producing errors during a transfer of data packets, the control processor 20 uses the switch 30, which functions as an alternate bus for the control processor 20. In order to function as an alternative bus to the primary bus, the bus state machine 37 in the switch 30 reformats data packets received from the control processor 20. Specifically, the bus interface 36 modifies the received data packets that are formatted according to the first protocol so that the data packets sent from the switch 30 are formatted according to a second protocol. In this manner the bus interface 36 and the bus state machine 37 in the switch 30 provide an alternative bus to the embedded system primary bus architecture to transfer commands between the control processor 20 and the peripheral components 60-66. The controller interface 35 receives the address of the peripheral component 60, 61, 62, 63, 64, 65, or 66 and data to be sent to the addressed peripheral component 60, 61, 62, 6364, 65, or 66. The addressed peripheral component 60, 61, 62, 6364, 65, or 66 is referred to here as “targeted peripheral component 60, 61, 62, 6364, 65, or 66.” The peripheral components 60-66 are slave devices for the switch.
In one implementation of this embodiment, the first protocol data packet received from the controller 20 is a RS232 data packet. In another implementation of this embodiment, the first protocol data packet received from the controller 20 is formatted according to a Spacewire protocol. In yet another implementation of this embodiment, the first protocol data packet received from the controller 20 is formatted according to a Rapid TO protocol. In yet another implementation of this embodiment, the first protocol data packet received from the controller 20 is formatted according to a Spacewire protocol and the second protocol data packet sent from the switch 30 is formatted according to the System Management Bus protocol. A system to implement the latter embodiment is shown in
The plurality of peripheral components 55 comprises subsets 50, 51, and 52 as described above with reference to
The controller interface 135 receives data packets that are formatted according to a first protocol from the control processor 20. In one implementation of this embodiment, the first protocol is a Spacewire protocol. In another implementation of this embodiment, the first protocol is Rapid IO. In another implementation of this embodiment, the first protocol is RS232 data packets. The bus interface 136 reformats the received data packets from the first protocol to a System Management Bus (SMBus) protocol. A data packet formatted according to the SMBus protocol is transferred to a subset 50, 51, or 52 of the plurality of peripheral components 55 via the respective ports 140, 141 or 142. The SMBus interface 136 includes a SMBus state machine 137 that controls the functionality of the SMBus interface 136 during the reformatting of the data packets.
A primary bus in the system 12 uses an embedded system primary bus architecture to transfer commands and data between the control processor 20 and the plurality of peripheral components 55. When the primary bus is locked-up or producing errors during a transfer of data packets, the control processor 20 uses the switch 130, which functions as an alternate bus for the control processor 20. In order to function as an alternative bus to the primary bus, the bus state machine 137 in the switch 130 reformats data packets. Specifically, the bus interface 136 modifies the received data packets that are formatted according to the first protocol so that the data packets sent from the switch 30 are formatted according to the SMBus protocol. In this manner the bus interface 136 and the bus state machine 137 in the SMBus port switch 130 provide an alternative bus to the embedded system primary bus architecture to transfer commands between the control processor 20 and the peripheral components 60-66.
The SMBus Block Write 101, also referred to here as “address block write 101,” transfers an address of the targeted peripheral component in the slave address field 150. The SMBus Block Write 101 also transfers the address of the internal location, for example internal location 70 of peripheral component 60, in the address offset field(s) 145, 146, and/or 147. The second SMBus Block Write 102, also referred to here as “data block write 102,” transfers data to the targeted peripheral component in the data byte fields 155, 156 and 157. More or fewer data byte fields can be used as required. The address of the targeted peripheral component is in the slave address field 152 of the SMBus Block Write 102 and is the same as the slave address field 150 in the SMBus Block Write 101.
In one implementation of this embodiment, a first portion of the address block, such as the upper four binary bits in the slave address fields 150 and 152, are decoded by the SMBus port switch 130 to determine which port is being addressed. In this case, the number of peripheral ports connected to the switch is limited to sixteen. A second portion of the address block in the data packet, such as the lower three binary bits in the slave address fields 150 and 152, are decoded by the peripheral components to determine which peripheral component on the port is being addressed. In this case, the number of peripheral components connected to the switch is limited to eight.
Each peripheral component that receives the data packet 100 decodes the lower three bits of the slave address field 150 to determine if it is the targeted peripheral component for the data packet 100. If a peripheral component determines it is the targeted peripheral component, it decodes the address offset field 145 of the SMBus Block Write 101 to determine the address of the targeted internal location. After the internal location is known, the data sent from the switch 130 in the data byte fields 155, 156 and 157 of the data block write 102 of the data packet 100 is stored at the internal location.
For example, a data packet 100 is sent via port 140 (
After the targeted peripheral component sends an acknowledgement in data field 169 to acknowledge receipt of the command code 161, the SMBus port switch 130 resends the address of a targeted peripheral component in the second slave address field 162. The second slave address field 162 indicates to the targeted peripheral component that SMBus Block Read 104 is a read data packet. The targeted peripheral component then transfers data from the internal location, which was addressed in address offset field(s) 145, 146, and/or 147. The data from the internal location is sent in the data byte fields 158 and 159 from the targeted peripheral component to the SMBus port switch 130. In this manner, information from the internal location is sent to the switch in response to receiving the read command data packet 105.
In an exemplary case, the targeted peripheral component 63 receives the read command data packet 105 from the switch 130 via port 141; the peripheral component 63 determines that the internal location 82 is targeted in the address offset field(s) 145, 146 and/or 147 of the SMBus Block Write 103; the targeted peripheral component 63 responds to the receipt of the second slave address field 162 by sending data from the targeted internal location 82 in the data byte fields 158 and 159 as part of the SMBus Block Read 104 in the command data packet 105 to the switch 130 via port 142. In this manner, the SMBus Block Read 104 completes the transaction with the switch 130. In one implementation of this embodiment, this process is implemented with switch 30 described above with reference to
The type of data in the response to the switch is dependent upon the command code in the command code field 161. Some exemplary selected command codes are shown in Table 1 with the associated binary bytes assigned to the commands and the associated descriptions of the commands.
In an exemplary case, the peripheral component 66 receives a SMBus Address Block Read 107 from the switch 130. The SMBus Address Block Read 107 includes a selected command code “10011001” (Row 4 of Table 1) in the command code field 161 and the address of the peripheral component 66 in the slave address fields 160 and 162. In this exemplary case, the peripheral component 66 responds to the second slave address field 162 in the SMBus Address Block Read 107 by sending data in the byte count field 163 that indicates the number of data bytes being sent from the peripheral component 66 to the switch 130. The peripheral component 66 then sends data in the address offset field(s) 245, 246, and/or 247 of the SMBus Address Block Read 107 that indicate the internal location 91 of the peripheral component 60 that was used in the previous SMBus transaction. The peripheral component 66 then sends data in the Block Length field 248 to indicate the number of data bytes accessed in the previous SMBus transaction for the peripheral component 66. The peripheral component 66 then sends a PEC data field 250 as a checksum to the switch 130 that is used to protect the integrity of the data sent in the SMBus Address Block Read 107. In one implementation of this embodiment, this process is implemented with switch 30 described above with reference to
An exemplary list of signal names and associated descriptions that are implemented in the SMBus interface 136 is shown in Table 2. The SIGNAL NAME column of Table 2 includes the signals indicated in the embodiment of the SMBus interface 136 for twelve ports shown in
When the SMBus state machine 137 is in IDLE (block 702), the SMBus state machine 137 outputs signals Sm_busy=0 and Sm_mstr_rls=1 to indicate that the SMBus state machine 137 is in the idle state. When a System Management Bus_RD=1 or SMB_WRT=1 signal is received at the SMBus state machine 137, a port is selected (block 704) and the SMBus state machine 137 outputs signals to indicate it is busy (Smb_busy=1) and outputs signals to control which port is selected (Ld_smb_addr=1, Sm_sel_port=1, and Sm_mstr_rls=1).
An address block write data packet 101 (
If a write command was received at the SMBus state machine 137, the flow proceeds to block 710 and a second data block write data packet 102 (
If an Address Block Read packet 107 (
At block 802, information embedded in a command data packet formatted in a first protocol is retrieved at a switch. The switch is adapted to function as an alternate bus. In one implementation of this embodiment, the switch is switch 30 as described above with reference to
At block 808, a reformatted data packet is formed at the switch. The reformatted data packet is formatted according to a second protocol and includes the information retrieved during block 802. In one implementation of this embodiment, the reformatted data packet is the data packet 100 as described above with reference to
At block 902, data packets structured as a first SMBus Block Write are used to transfer an address from the switch to a peripheral component in a system write command. The address is the address of an internal location in a targeted peripheral component. In one implementation of this embodiment, the data packets are reformatted by the switch 130 of
At block 906, data packets structured as a SMBus Block Write are used to transfer an address from the switch to the peripheral component in a system read command. The transferred address is the address of the internal location in the communicating peripheral component from which the switch is to receive data. In one implementation of this embodiment, the data packets are reformatted by the switch 130 of
At block 908, data packets structured as a SMBus Block Read are used to transfer data to the switch in the system read command. In one implementation of this embodiment, the data packets are reformatted by the switch 130 of
At block 910, data packets structured as a SMBus Address Block Read are initiated by the switch to the peripheral component, in order to transfer address information and a number of data bytes accessed in a previous transaction of the peripheral component to the switch. In one implementation of this embodiment, the data packets are reformatted by the switch 130 of
At block 1002, the reformatted data packet is received at a peripheral component addressed by the first portion of the address block. In one implementation of this embodiment, the data packets are reformatted by the switch 130 of
At block 1004, a second portion of the address block in the data packet is decoded at the peripheral component. In one implementation of this embodiment, the data packets are reformatted by the switch 130 of
At block 1006, the targeted peripheral component confirms the data packet is addressed to the peripheral component. The confirmation is based on the second portion of the address block that was decoded during block 1004.
At block 1008, the peripheral component decodes the address offset bytes to determine at least one internal location of the peripheral component. In one implementation of this embodiment, the number of decoded address offset bytes is in a range from one to thirty one. In another implementation of this embodiment, the data packets are reformatted by the switch 130 of
Block 1010 is implemented if the reformatted data packet is configured as the data packet 110 as described above with reference to
At block 1102, information embedded in a command data packet formatted according to a first protocol is retrieved at a switch. The retrieved information includes an address of a peripheral component and data for the peripheral component. In one implementation of this embodiment, the switch is switch 130 as described above with reference to
At block 1104, the address of the peripheral component is transferred from the switch in a first SMBus Block Write data packet according to the System Management Bus protocol. The first SMBus Block Write data packet is transferred to the peripheral component. In one implementation of this embodiment, the first SMBus Block Write data packet is the first SMBus Block Write 101 as described above with reference to
At block 1106, the data for the peripheral component is transferred from the switch in a second SMBus Block Write data packet according to the System Management Bus protocol. The second SMBus Block Write data packet follows the first SMBus Block Write data packet and is transferred to the targeted peripheral component. In one implementation of this embodiment, the second SMBus Block Write data packet is the second SMBus Block Write 102 as described above with reference to
Although specific embodiments have been illustrated and described herein, it will be appreciated by those of ordinary skill in the art that any arrangement, which is calculated to achieve the same purpose, may be substituted for the specific embodiment shown. This application is intended to cover any adaptations or variations of the present invention. Therefore, it is manifestly intended that this invention be limited only by the claims and the equivalents thereof.
This application is related to U.S. patent applications Ser. No. ______ (Attorney Docket No. H0012926-5801) having a title of “A METHOD TO EMBED PROTOCOL FOR SYSTEM MANAGEMENT BUS IMPLEMENTATION” (also referred to here as the “H0012926-5801 Application”) filed on the same date herewith. The H0012926-5801 application is hereby incorporated herein by reference.
The U.S. Government may have rights in the invention under a restricted government contract.