Prior to reducing an integrated circuit design to a form suitable for fabrication, the integrated circuit design is often simulated in software on a computer to allow the design to be optimized and debugged. Typically, using a hardware description language (e.g., Verilog), the circuit designer prepares a description of the integrated circuit, which is then compiled into a software model to be simulated on the computes (e.g., an engineering workstation).
When an integrated circuit that connects to peripheral hardware, such as an LCD display or a Universal Serial Bus (USB) port, is simulated, the peripheral hardware is modeled in the hardware description language and communication with the peripheral hardware is also simulated. However, such a model of the peripheral hardware does not behave completely accurately and correctly. There are often logical, electrical, or timing differences between the simulation model and the physical peripheral hardware. When the integrated circuit is manufactured and connected to the actual peripheral hardware, these problems will become apparent and the integrated circuit will often need to be redesigned to compensate for them.
The present invention allows a logic circuit simulator running on a host computer (e.g., a personal computer) and simulating a circuit (“simulated device”) to connect to a physical peripheral hardware device. The present invention provides a method and an apparatus for transferring data between a circuit simulation and the peripheral hardware device. In one embodiment, an interface software program also installed on said host computer is provided to handle communication between the operating system drivers for the peripheral hardware device and the simulated device. The peripheral hardware device can be, for example, a computer display monitor.
According to the present invention, data sent to a simulated device from a physical peripheral hardware device is received by the interface software and stored in buffers in the existing memory in the host computer. Said interface software in said host computer repackages the data into a second format for transmission to said simulated device. In one embodiment, the data from said physical peripheral hardware device is sent to the operating system of said host computer. Said interface software intercepts said data and examines it. If said data is intended for said simulated device, said interface software loads it into said data buffers, subsequently repackages said data into a second format for transmission to said simulated device and sends said repackaged data to the simulated device. If said data from said physical peripheral hardware device is not intended for said simulated device, said interface software program sends said data on to said host computer operating system.
Similarly, the interface software in the host computer repackages data received from the simulated device into proper format for transmission to the physical peripheral hardware device. Under this arrangement, the existing memory in the host computer is used to buffer data communicated between said simulated device and said physical peripheral hardware device. In one embodiment, the data from said simulated device is sent to the interface software program. If said data is intended for said physical peripheral hardware device, said interface software program repackages said data and sends said data to said host computer operating system for transmission to said physical peripheral hardware device. Said operating system is notified that said data is intended for said physical peripheral hardware device because said interface software program uses a specific application program interface (API) of the operating system used specifically to access said physical peripheral hardware device.
In one embodiment, the interface software of the host computer is implemented as a multithread program including four executing threads. One thread is a task that receives data from the physical peripheral hardware device and stores said received data in a first buffer. A second thread is a task that polls said first buffer for said received data. This second thread repackages said received data and sends said repackaged data via the simulation interface to the simulated device. A third thread is a task that receives data from said simulated device via said simulation interface and stores said received data in a second buffer. A fourth thread is a task that polls said second buffer for said data received from said simulated device. Said fourth thread repackages said data received from said simulated device and sends said repackaged data to said physical peripheral hardware device using an API of the operating system software of said host computer.
In another embodiment, the interface software of the host computer is implemented as a multithread program, as in the previous embodiment, except that the second buffer is eliminated and the third and fourth threads are combined into a single thread. In this embodiment, the tasks of the single thread receive data from the simulated device via the simulation interface, repackages said received data and sends said repackaged to said physical peripheral hardware device using an API of the operating system software of said host computer. This approach is possible because a circuit simulation runs at a much slower speed than the physical peripheral hardware device, such that data received from the simulated device can be repackaged and sent to the physical peripheral hardware device before the next data packet's arrival from the circuit simulation.
In yet another embodiment, the interface software of the host computer is implemented as a multithreaded program having, in one instance, two executing threads. One thread is a task that receives data from the physical peripheral hardware device, stores said received data in a buffer, retrieves said stored data for repackaging, and sends said repackaged data via a simulation interface to the simulated device. Another thread is a task that receives data from said simulated device via said simulation interface from said simulated device, repackages said data and sends said repackaged data to said physical peripheral hardware device using an API of the operating system software of said host computer.
Further features and advantages of various embodiments of the invention are described in the detailed description below, which is given by way of example only.
The present invention will be understood more fully from the detailed description given below and from the accompanying drawings of the preferred embodiment of the invention, which, however, should not be taken to limit the invention to the specific embodiment but are for explanation and understanding only.
In the following detailed description, to simplify the description, like elements are provided like reference numerals.
Software that allows a logic circuit simulator running on a host computer (e.g., a personal computer) and simulating a circuit (“simulated device”) to connect to a physical peripheral hardware device is described. In the following description, numerous specific details are set forth, such as the peripheral interface, the operating system, the type of computer, etc., in order to provide a thorough understanding of the present invention. It will be obvious, however, to one skilled in the art that these specific details need not be used to practice the present invention. In other instances, well known structures, functions, and software programs have not been shown in detail in order not to unnecessarily obscure the present invention.
A circuit simulation program 203 runs at a higher level than the operating system and uses the operating system to communicate with the user to display information via a peripheral such as a monitor or a printer. Said simulation program also uses the operating system to get information from a user via the mouse or keyboard. The operating system 204 also allows said simulation 203 and other applications to be running simultaneously and allocates time and resources to all applications according to set priorities.
One embodiment of the invention is shown as SoftBridge program 200, an application program that runs on top of the operating system, which controls the computer resources allocated to it. The SoftBridge program 200 can communicate to the simulation 203 via a software interface called a programming language interface (PLI) 206.
Note that the SoftBridge program 200 can use the hardware peripheral APIs 202 to access the hardware peripherals indirectly. In some cases, to increase performance for example, it may be necessary for the SoftBridge program 200 to access the driver software 205 directly, bypassing the operating system 204 and the APIs provided by the operating system.
The user interface 201 is the part of the SoftBridge program 200 that allows the human user to enter information and control operation of the program 200. Said user interface 201 also gives results back to the human user.
In prior art, a circuit simulation of a device that drives a hardware peripheral would output raw data. An engineer would then look over the data and compare it manually to a specification for said hardware peripheral to determine whether the data is correct. This manual checking of data is a time consuming operation that is prone to human error and limits the amount of simulation that can be run because time in the development process must be allocated for humans to check the results. Another prior art method is to create a circuit simulation of the hardware peripheral (“simulated peripheral”) and have the simulated device drive the simulated peripheral and observe that the correct behavior occurs. This method requires that an engineer write a model for said hardware peripheral. Not only does this take time to develop said model, but the model itself is prone to human error because it may not be completely correct and may thus not accurately model the true behavior of the peripheral hardware. Because the circuit simulation software must now simulate not only the device that drives the software but also the peripheral hardware device being driven, the simulation software runs much slower.
In prior art, a simulated device that receives data from a hardware peripheral would need to have raw data written by an engineer and then used by the simulation software as stimuli for the device. This manual creation of data is a time consuming operation that is prone to human error and limits the amount of simulation that can be run because time in the development process must be allocated for humans to create the data. Another prior art method is to create a circuit simulation of the hardware peripheral and have the simulated peripheral drive the simulated device and observe that the behavior is correct. This method requires that an engineer write a model for the hardware peripheral. Not only does this take time to develop said model, but the model itself is prone to human error because it may not be completely correct and may thus not accurately model the true behavior of the peripheral hardware. Because the circuit simulation software must now simulate not only the device that drives the software but also the peripheral hardware device being driven, the simulation software runs much slower.
In other prior art, a hardware peripheral device is connected, pin by pin, to another hardware peripheral device called a hardware modeler interface, which is in turn connected to a host computer. Said host computer runs a circuit simulation of a device. Whenever said simulated device intends to stimulate said hardware peripheral, said simulation software notifies special hardware modeling software, which forces said hardware modeler interface to assert or deassert signals to said hardware peripheral according to the simulated device outputs. Similarly, whenever said hardware peripheral outputs change, said signals are sent to said hardware modeler interface, which notifies said hardware modeling software, which in turn notifies said simulation software, which stimulates said simulated device. This method requires very specialized software, the hardware modeling software, to interface between the simulation software and the hardware modeler interface. This hardware modeling software must continually be rewritten to be compatible with new operating systems, new host computers, or new simulation software. The hardware modeler interface is a costly, specialized piece of hardware that must physically be connected to the hardware peripheral. Said hardware modeler interface is limited to connecting to certain hardware peripheral devices by the type and size of the connectors that it has available. For example, to connect to an ISA card, said hardware modeler interface must have an ISA connector and to connect to a PCI card, said hardware modeler interface must have a PCI connector. To be able to connect to any kind of peripheral device would require said hardware modeler interface to comprise an extremely large circuit board with dozens of connectors, or consist of dozens of different boards for connecting to different peripheral hardware devices.
The present invention overcomes the limitations of the prior art by interfacing a real hardware peripheral to the circuit simulation of said device, taking advantage of standard software that is easily available and has already been fully tested. This standard software includes driver software and APIs that are written by the hardware peripheral manufacturer and are included in most standard operating systems. As shown in
Thread 4 consists of a data reception routine 307 that retrieves data from circuit simulator 203 via a PLI. Thread 4 may obtain said data by polling the circuit simulator or alternatively via an interrupt mechanism that signals the thread whenever data is available from said circuit simulator. Said data reception routine 307 stores said received data in shared memory buffer 306. Thread 3 consists of data transmission routine 305 that polls said shared buffer 306. When data is available in said shared buffer 306, said data reception routine 305 retrieves said data. If necessary, said data reception routine 305 modifies said data to be acceptable to the hardware peripheral. Said data reception routine 305 then transmits said data to said hardware peripheral either via the operating system API 202 or directly to the hardware drivers.
In this embodiment, the SoftBridge program 200 has a stop routine 308 that takes input from the user in order to stop all executing threads of the program.
Thread 3 consists of a data reception routine 307 that retrieves data from circuit simulator 203 via a PLI and a data transmission routine 305 that transmits said data to the hardware peripheral either via the operating system API 202 or directly to the hardware drivers. Thread 3 may obtain said data by polling the circuit simulator or alternatively via an interrupt mechanism that signals the thread whenever data is available from said circuit simulator. Said data reception routine 307 sends said received data to said data reception routine 305 that modifies said data to be acceptable to the hardware peripheral, if necessary, then transmits said data to said hardware peripheral either via the operating system API 202 or directly to the hardware drivers. This embodiment takes advantage of the fact that the circuit simulator 203 is running much slower than the software of the SoftBridge program 200 and that the hardware peripheral can receive data at a faster rate than the software can send it. Therefore there is only a single thread to retrieve data from the circuit simulator and send it to the hardware peripheral. In this embodiment, the SoftBridge program 200 can perform the entire operation of thread 3 without slowing down the circuit simulator or the hardware peripheral. Unlike the embodiment shown in
In this embodiment, the SoftBridge program 200 has a stop routine 308 that takes input from the user in order to stop all executing threads of the program.
Thread 2 consists of a data reception routine 307 that retrieves data from circuit simulator 203 via a PLI and a data transmission routine 305 that transmits said data to the hardware peripheral either via the operating system API 202 or directly to the hardware drivers. Thread 2 may obtain said data by polling the circuit simulator or alternatively via an interrupt mechanism that signals the thread whenever data is available from said circuit simulator. Said data reception routine 307 sends said received data to said data reception routine 305 that modifies said data in order to be acceptable to the hardware peripheral, if necessary, then transmits said data to said hardware peripheral either via the operating system API 202 or directly to the hardware drivers.
In this embodiment, the SoftBridge program 200 has a stop routine 308 that takes input from the user in order to stop all executing threads of the program.
Various modifications and adaptations of the operations described here would be apparent to those skilled in the art based on the above disclosure. Many variations and modifications within the scope of the present SoftBridge program 200 are therefore possible. The present SoftBridge program 200 is set forth by the following claims.
The present application is a continuation of U.S. appl. Ser. No. 11/557,064, filed Nov. 6, 2006, which is a continuation of U.S. appl. Ser. No. 10/158,648, filed May 31, 2002, now U.S. Pat. No. 7,226,490, which is a continuation-in-part of U.S. appl. Ser. No. 09/751,573, filed Dec. 28, 2000, now U.S. Pat. No. 7,050,962, which claims the benefit of provisional application 60/193,169 filed on Mar. 28, 2000. The disclosures of each of the above-referenced applications are incorporated by reference herein in their entireties.
Number | Name | Date | Kind |
---|---|---|---|
4486877 | Turner | Dec 1984 | A |
4590581 | Widdoes, Jr. | May 1986 | A |
4635218 | Widdoes, Jr. | Jan 1987 | A |
4744084 | Beck et al. | May 1988 | A |
4907225 | Gulick et al. | Mar 1990 | A |
4908819 | Casady et al. | Mar 1990 | A |
4939507 | Beard et al. | Jul 1990 | A |
5048012 | Gulick et al. | Sep 1991 | A |
5272728 | Ogawa | Dec 1993 | A |
5280481 | Chang et al. | Jan 1994 | A |
5299313 | Petersen et al. | Mar 1994 | A |
5299314 | Gates | Mar 1994 | A |
5303347 | Gagne et al. | Apr 1994 | A |
5307459 | Petersen et al. | Apr 1994 | A |
5347305 | Bush et al. | Sep 1994 | A |
5353412 | Douglas et al. | Oct 1994 | A |
5361363 | Wells et al. | Nov 1994 | A |
5477531 | McKee et al. | Dec 1995 | A |
5479355 | Hyduke | Dec 1995 | A |
5497498 | Taylor | Mar 1996 | A |
5539452 | Bush et al. | Jul 1996 | A |
5553059 | Emerson et al. | Sep 1996 | A |
5596575 | Yang et al. | Jan 1997 | A |
5659684 | Giovannoni et al. | Aug 1997 | A |
5663900 | Bhandari et al. | Sep 1997 | A |
5678028 | Bershteyn et al. | Oct 1997 | A |
5684721 | Swoboda et al. | Nov 1997 | A |
5734858 | Patrick et al. | Mar 1998 | A |
5740448 | Gentry et al. | Apr 1998 | A |
5748806 | Gates | May 1998 | A |
5748875 | Tzori | May 1998 | A |
5752068 | Gilbert | May 1998 | A |
5754764 | Davis et al. | May 1998 | A |
5761486 | Watanabe et al. | Jun 1998 | A |
5771370 | Klein | Jun 1998 | A |
5805792 | Swoboda et al. | Sep 1998 | A |
5822520 | Parker | Oct 1998 | A |
5838919 | Schwaller et al. | Nov 1998 | A |
5838950 | Young et al. | Nov 1998 | A |
5848236 | Dearth et al. | Dec 1998 | A |
5850345 | Son | Dec 1998 | A |
5857109 | Taylor | Jan 1999 | A |
5881269 | Dobbelstein | Mar 1999 | A |
5889954 | Gessel et al. | Mar 1999 | A |
5907696 | Stilwell et al. | May 1999 | A |
5911059 | Profit, Jr. | Jun 1999 | A |
5933656 | Hansen | Aug 1999 | A |
5938732 | Lim et al. | Aug 1999 | A |
5963726 | Rust et al. | Oct 1999 | A |
6014651 | Crawford | Jan 2000 | A |
6047387 | Chang et al. | Apr 2000 | A |
6061767 | Kuo et al. | May 2000 | A |
6067585 | Hoang | May 2000 | A |
6108309 | Cohoe et al. | Aug 2000 | A |
6128673 | Aronson et al. | Oct 2000 | A |
6141689 | Yasrebi | Oct 2000 | A |
6151567 | Ames et al. | Nov 2000 | A |
6173377 | Yanai et al. | Jan 2001 | B1 |
6202044 | Tzori | Mar 2001 | B1 |
6223144 | Barnett et al. | Apr 2001 | B1 |
6229808 | Teich et al. | May 2001 | B1 |
6230114 | Hellestrand et al. | May 2001 | B1 |
6243833 | Hitchcock et al. | Jun 2001 | B1 |
6263302 | Hellestrand et al. | Jul 2001 | B1 |
6279122 | Hitchcock et al. | Aug 2001 | B1 |
6279146 | Evans et al. | Aug 2001 | B1 |
6307877 | Philips et al. | Oct 2001 | B1 |
6324492 | Rowe | Nov 2001 | B1 |
6327579 | Crawford | Dec 2001 | B1 |
6333940 | Baydar et al. | Dec 2001 | B1 |
6345242 | Dearth et al. | Feb 2002 | B1 |
6347388 | Hollander | Feb 2002 | B1 |
6389379 | Lin et al. | May 2002 | B1 |
6405145 | Rust et al. | Jun 2002 | B1 |
6418392 | Rust et al. | Jul 2002 | B1 |
6536029 | Boggs et al. | Mar 2003 | B1 |
6560641 | Powderly et al. | May 2003 | B1 |
6563796 | Saito | May 2003 | B1 |
6563816 | Nodoushani et al. | May 2003 | B1 |
6571205 | Doucet et al. | May 2003 | B1 |
6584436 | Hellestrand et al. | Jun 2003 | B2 |
6597727 | Philips et al. | Jul 2003 | B2 |
6640101 | Daniel | Oct 2003 | B1 |
6691301 | Bowen | Feb 2004 | B2 |
6704895 | Swoboda et al. | Mar 2004 | B1 |
6751583 | Clarke et al. | Jun 2004 | B1 |
6757367 | Nicol | Jun 2004 | B1 |
6772107 | La Cascia, Jr. et al. | Aug 2004 | B1 |
6782355 | Cook et al. | Aug 2004 | B1 |
6785873 | Tseng | Aug 2004 | B1 |
6807583 | Hrischuk et al. | Oct 2004 | B2 |
6810442 | Lin et al. | Oct 2004 | B1 |
6850510 | Kubler et al. | Feb 2005 | B2 |
6850577 | Li | Feb 2005 | B2 |
6862635 | Alverson et al. | Mar 2005 | B1 |
6865526 | Henkel et al. | Mar 2005 | B1 |
6876962 | Reblewski | Apr 2005 | B2 |
6898233 | Philips et al. | May 2005 | B2 |
6904110 | Trans et al. | Jun 2005 | B2 |
6915521 | Monteiro | Jul 2005 | B1 |
6982993 | Claveloux et al. | Jan 2006 | B1 |
7050962 | Zeidman | May 2006 | B2 |
7076418 | Mayer | Jul 2006 | B1 |
7124064 | Thurston | Oct 2006 | B1 |
7200544 | McCown | Apr 2007 | B1 |
7209470 | McGowan | Apr 2007 | B2 |
7283123 | Braun et al. | Oct 2007 | B2 |
20010038674 | Trans | Nov 2001 | A1 |
20010041566 | Xanthos et al. | Nov 2001 | A1 |
20010049594 | Klevans | Dec 2001 | A1 |
20020001088 | Wegmann et al. | Jan 2002 | A1 |
20020018163 | Yamamoto et al. | Feb 2002 | A1 |
20020019969 | Hellestrand et al. | Feb 2002 | A1 |
20020032559 | Hellestrand et al. | Mar 2002 | A1 |
20020056358 | Ludwig | May 2002 | A1 |
20020067757 | Philips et al. | Jun 2002 | A1 |
20020095224 | Braun et al. | Jul 2002 | A1 |
20020127525 | Arington et al. | Sep 2002 | A1 |
20020138244 | Meyer | Sep 2002 | A1 |
20020181633 | Trans | Dec 2002 | A1 |
20030033588 | Alexander | Feb 2003 | A1 |
20030033594 | Bowen | Feb 2003 | A1 |
20030040897 | Murphy et al. | Feb 2003 | A1 |
20030043753 | Nelson et al. | Mar 2003 | A1 |
20030086426 | Vandeweerd et al. | May 2003 | A1 |
20030093257 | Cavanagh et al. | May 2003 | A1 |
20030093569 | Sivier et al. | May 2003 | A1 |
20030101040 | Nightingale | May 2003 | A1 |
20030126195 | Reynolds et al. | Jul 2003 | A1 |
20030137528 | Wasserman et al. | Jul 2003 | A1 |
20030225556 | Zeidman | Dec 2003 | A1 |
20030225564 | Zeidman | Dec 2003 | A1 |
20040034719 | Peterson et al. | Feb 2004 | A1 |
20040095398 | Muratori et al. | May 2004 | A1 |
20040143655 | Narad et al. | Jul 2004 | A1 |
20040148610 | Tsun et al. | Jul 2004 | A1 |
20040208293 | Mohammadian et al. | Oct 2004 | A1 |
20050026649 | Zicker et al. | Feb 2005 | A1 |
20050102125 | Tseng | May 2005 | A1 |
20060059387 | Swoboda et al. | Mar 2006 | A1 |
20060179427 | Underseth et al. | Aug 2006 | A1 |
20060259949 | Schaefer et al. | Nov 2006 | A1 |
20070061127 | Zeidman | Mar 2007 | A1 |
20070064694 | Ziedman | Mar 2007 | A1 |
20070067151 | Fiedler et al. | Mar 2007 | A1 |
20070100598 | Zeidman | May 2007 | A1 |
20080058005 | Zicker et al. | Mar 2008 | A1 |
Number | Date | Country | |
---|---|---|---|
20110125479 A1 | May 2011 | US |
Number | Date | Country | |
---|---|---|---|
60193169 | Mar 2000 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 11557064 | Nov 2006 | US |
Child | 12946721 | US | |
Parent | 10158648 | May 2002 | US |
Child | 11557064 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 09751573 | Dec 2000 | US |
Child | 10158648 | US |