The invention relates to optimization of memory access across buses of different speeds.
Network processors are often located on an I/O card which is distinct from a control complex card containing a control complex for controlling the network processor. When the network processor is started up, memory attached to the network processor is typically diagnosed and then a boot loader is loaded into the memory. In some systems, particularly legacy systems, the diagnosis and the loading of the boot loader is performed from the control complex.
A high speed bus, such as a PCI bus, provides fast access to the network processor. However the bus communicating between the cards, that is the control complex bus from the control complex card to the I/O card, is often much slower than the PCI bus. The control complex bus is usually a 16-bit asynchronous bus. The PCI bus is typically about 400 times the speed of the control complex bus. A bridge is provided on the I/O card for enabling communication between the control complex using the control complex bus and the network processor using the PCI bus.
In such systems diagnosis of the network processor memory is performed by writing known data to some or all of the memory locations, and then reading back the data from the memory locations and comparing the read values with those that were written. The slow speed of the control complex bus limits how such diagnosis can be carried out at any efficient speed. One solution is to have the control complex issue the write and read commands, but to only write data to a portion of the memory. Another solution is for the control complex to load a boot loader into the network processor, and then have the boot loader perform diagnosis on the memory. However this is complicated, and furthermore is slow due to the large size of the boot loader and the slow speed of the control complex bus. Another solution is build a boot loader ROM into the network processor. However this is expensive since a boot ROM part must be added to the I/O card. Furthermore, the boot loader ROM is typically located on the control complex card anyway, and so a second boot loader ROM may be unnecessary duplication.
Another problem arising from the slow control complex bus speed is the loading of software into the memory of the network processor. Writing of data into the memory requires that the writing of data be verified, in order to spot corruption that may have been missed during the diagnosis process. However verifying of written data requires two passes of data across the control complex bus, once when the data is being written to memory and once when the data is being read from memory. This is particularly a problem for a control complex which loads a boot loader into network processor memory, as the boot loader is typically large.
A solution which allowed diagnosis and verification of data writing to avoid the bottleneck of the control complex bus would increase the speed at which network processors could be started up, especially in legacy systems in which the control complex bus is much slower than the PCI bus which provides access to the network processor.
In accordance with one aspect of the invention a method of verifying a memory of a processor to a control system is provided, the control system communicating with a bridge through a first bus and the processor communication with the bridge through a second bus. The control system instructs the bridge to verify the memory. Data is written to the memory and a checksum of the data is generated. The bridge reads the data from memory and generates a checksum of the read data. The bridge compares the checksum of the data and the checksum of the read data. Based on the comparison of the two checksums, the bridge sends a status to the control system indicative of whether errors exist in the memory. The control system may instruct the bridge to perform a diagnosis of the memory, in which case the data is written to memory by the bridge writing a pattern of data to the memory. The control system may instruct the bridge to verify loading of data into the memory, in which case the data is written into memory and the status sent by the bridge to the control system indicates that the data was loaded into memory correctly.
In accordance with another aspect of the invention a bridge between a first bus communicating with a control system and a second bus communicating with a processor. The bridge includes a write checksum generator for generating a checksum of data written to memory of the processor. The bridge also includes a read checksum generator for generating a checksum of data read from the memory. The bridge also includes means to provide the control system with a status indicating whether errors exist in the memory as determined by a comparison of the checksums. The bridge may include means for receiving a first control signal from the control system requesting that a diagnosis of the memory be carried out, in which case the bridge also includes a filler for writing a pattern of data to the memory. The bridge may include means for receiving a second control signal from the control system indicating that verification of loading of data sent by the control system is to be carried out, in which case the write checksum is generated for data written from the control system to the memory, the read checksum is generated for data read from memory locations to which the loaded data was written, and the status indicates whether the loading of data was successful.
The methods of the invention may be stored as processing instructions on computer-readable media. The methods may also be stored as processing instructions loaded into an FPGA.
The methods and apparatus of the present invention allow faster diagnosis and data writing into a network processor which is connected to a control complex via a slow control complex bus. By placing high level commands within an FPGA bridge between the control complex bus and the PCI bus, the control complex may initiate execution of large commands on the network processor memory by issuing relatively small commands across the control complex bus to the bridge. The invention may be used with legacy systems which use a slow interface between the control complex card and the I/O card, and may also be used with simple network processors which do not have a built-in boot loader ROM.
The features and advantages of the invention will become more apparent from the following detailed description of the preferred embodiment(s) with reference to the attached figures, wherein:
It will be noted that in the attached figures, like features bear similar labels.
Referring to
Referring to
The CPU mailbox 40 includes a write assistor 46. The bridge 22 includes a PCI hardware assist 44 in communication with both the CPU mailbox 40 and the PCI core 42. The PCI hardware assist 44 includes a write checksum generator 48, a read checksum generator 50, a filler 52, and an assist state machine 54.
The bridge 22 is preferably in the form of an FPGA, in which the write assistor 46, the write checksum generator 48, the read checksum generator 50, the filler 52, and the assist state machine 54 are in the form of logical instructions programmed into the FPGA. The logical instructions are deliberately kept as simple high level commands, in to simplify loading of the FPGA. The logical instructions may be stored on a computer-readable medium.
The control complex diagnoses memory of the network processor and loads firmware into the network processor using high level control commands sent to the write assistor 46 and the PCI hardware assist 44. The PCI hardware assist 44 and the write assistor 46 allow the control complex to communicate with the network processor with a lower amount of data passing over the control complex bus 14. Broadly, the control complex performs diagnostics on the network processor by issuing a simple command and receiving a simple status value rather than by transferring entire data sets across the slow control complex bus, because the writing and reading of data is performed only over the faster PCI bus 20. Similarly, verification of loading of data is performed only over the fast PCI bus 20. In each case, the functionality for performing the data intensive tasks is offloaded from the control complex to the bridge.
In the embodiment described above with reference to
In the embodiment described above with reference to
In both examples above, namely diagnosing memory and verifying the loading of data into memory, advantage of the invention is realized by the use of checksums and reading of the data in memory by elements of the bridge and not by the control complex. In other words, the invention can be viewed as writing data to memory, calculating a checksum of the written data, reading data from memory by the bridge, calculating a checksum of the read data, and reporting the status of the memory to the control complex as indicated by a comparison of the checksums. In the case of memory diagnosis, the writing of data is performed by the filler and the status indicates whether the memory includes any errors. In the case of verification of loaded data, the writing of data is performed by the control complex with the assistance of the write assistor, and the status indicates whether the loading of data was successful.
Variations on the commands and functional structures described above may be used. For example, the high level commands issued by the control complex to the PCI assist may be combined or separated in numerous ways, as long as simple commands and statuses are passed over the control complex bus 14 rather than entire sets of data during diagnosis of the memory of the network processor, and as long as simple statuses are passed over the control complex bus 14 rather than entire sets of data during verification of loading of data into the memory of the network processor.
The invention has been described as using a write assistor to assist in loading data from the control complex into the memory. The increase in write speed from using a write assistor may be significantly less than the increase in read speed from reading the data into only the bridge (as opposed to into the control complex). This is because the data to be loaded must still cross the slow control complex bus from the control complex, and the increase in speed effected by the write assistor is a result of more efficient buffer and address usage within the PCI write transaction. The predominant increase in speed of the embodiment described above arises from not having to pass the read data back across the slow control complex bus. As such, the method and apparatus of the invention are advantageous even without use of a memory assistor. In such an alternative embodiment the control complex sends a control message to the assist state machine indicating that data is being loaded into the memory as usual, and the assist state machine simply instructs the write checksum generator to generate a checksum of the data being loaded from the control complex into the memory.
The invention has been described with a 16-bit asynchronous control complex bus and a PCI bus, a PCI core, and with a network processor. The invention finds advantage in any system which requires a control system to diagnose memory of a processor or verify loading of data into the processor, the diagnosis and verification being conducted through two buses of significantly different speeds, the slower bus being the one in direct communication with the control system, such that a communication bottleneck occurs in the bus closer to the control system. When the bus to the processor is not a PCI bus, then the PCI core is replaced with a core which handles low level tasks appropriate to communication over the bus.
The invention has been described having both a memory diagnostic function and a loaded data verification function. Either of these functions may be implemented alone, with the appropriate functional blocks omitted, and still provide speed improvements.
The embodiments presented are exemplary only and persons skilled in the art would appreciate that variations to the embodiments described above may be made without departing from the spirit of the invention.
Number | Name | Date | Kind |
---|---|---|---|
5181206 | Hashiguchi | Jan 1993 | A |
5539879 | Pearce et al. | Jul 1996 | A |
5996046 | Yagisawa et al. | Nov 1999 | A |
6134623 | Garcia et al. | Oct 2000 | A |
6912686 | Rodriguez et al. | Jun 2005 | B1 |
6918001 | Fanning | Jul 2005 | B2 |
6938188 | Kelleher | Aug 2005 | B1 |
6976205 | Ziai et al. | Dec 2005 | B1 |
7234004 | Raisch | Jun 2007 | B2 |
7251704 | Solomon et al. | Jul 2007 | B2 |
7275117 | Bennett et al. | Sep 2007 | B2 |
7318064 | Patterson | Jan 2008 | B2 |
7409477 | Wyatt et al. | Aug 2008 | B2 |
7454443 | Ram et al. | Nov 2008 | B2 |
7516395 | Nurmi et al. | Apr 2009 | B2 |
7650556 | Lee | Jan 2010 | B2 |
20030145270 | Holt | Jul 2003 | A1 |
20040267993 | Spencer et al. | Dec 2004 | A1 |
20050081124 | Luick | Apr 2005 | A1 |
20070162621 | Condorelli et al. | Jul 2007 | A1 |
20090055584 | Hafner et al. | Feb 2009 | A1 |
20090077661 | Allen et al. | Mar 2009 | A1 |
20090261857 | Marshall, Jr. | Oct 2009 | A1 |
Number | Date | Country | |
---|---|---|---|
20090182925 A1 | Jul 2009 | US |