Simulated input/output devices
First Claim
1. A method of simulating communication between devices, the method comprising:
- at a hardware simulator;
receiving, at a simulated device interface, a host request that represents a command from a host device for accessing a state register of a simulated device that is connected to the simulated device interface;
distributing the host request to a device endpoint of the simulated device interface;
generating, by simulating an operation of the simulated device, a device request for accessing the state register of the simulated device;
removing the host request from the device endpoint, wherein the receiving, generating, and removing are performed iteratively by concurrent threads;
determining a first time at which the device request is generated, and a second time at which the host request is removed from the device endpoint;
interleaving the host request and the device request into a merged sequence of requests such that, when the first time is earlier than the second time, the device request has priority over the host request; and
executing requests of the merged sequence of requests in an order in which the requests occur in the merged sequence of requests, wherein the requests include instructions for accessing state data stored by the state register.
1 Assignment
0 Petitions
Accused Products
Abstract
In one or more embodiments, methods and apparatus are provided for simulating device communications such as those of the Universal Serial Bus (“USB”) or the like. The methods and apparatus involve receiving host requests that represent commands in a communication protocol and are associated with communication endpoints, distributing the host requests across the communication endpoints in the order that they are received, to their associated endpoints to generate a distribution of requests, generating a reordered plurality of host requests by selecting the host requests from the communication endpoints in an order based upon the order in which the requests are received and one or more simulation factors, receiving device requests from a simulated device in accordance with the communication protocol, merging the reordered host requests and the plurality of device requests to form a merged sequence of requests, and performing commands from the merged sequence of requests in the order.
-
Citations
20 Claims
-
1. A method of simulating communication between devices, the method comprising:
-
at a hardware simulator; receiving, at a simulated device interface, a host request that represents a command from a host device for accessing a state register of a simulated device that is connected to the simulated device interface; distributing the host request to a device endpoint of the simulated device interface; generating, by simulating an operation of the simulated device, a device request for accessing the state register of the simulated device; removing the host request from the device endpoint, wherein the receiving, generating, and removing are performed iteratively by concurrent threads; determining a first time at which the device request is generated, and a second time at which the host request is removed from the device endpoint; interleaving the host request and the device request into a merged sequence of requests such that, when the first time is earlier than the second time, the device request has priority over the host request; and executing requests of the merged sequence of requests in an order in which the requests occur in the merged sequence of requests, wherein the requests include instructions for accessing state data stored by the state register. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A computing device comprising:
-
a processor; a memory configured to store instructions that when executed by the processor cause the processor to perform steps that include; receiving, at a simulated device interface, a host request that represents a command from a host device for accessing a state register of a simulated device that is connected to the simulated device interface; distributing the host request to a device endpoint of the simulated device interface; generating, by simulating an operation of the simulated device, a device request for accessing the state register of the simulated device; removing the host request from the device endpoint, wherein the receiving, generating, and removing are performed iteratively by concurrent threads; determining a first time at which the device request is generated, and a second time at which the host request is removed from the device endpoint; interleaving the host request and the device request into a merged sequence of requests such that, when the first time is earlier than the second time, the device request has priority over the host request; and executing requests of the merged sequence of requests in an order in which the requests occur in the merged sequence of requests, wherein the requests include instructions for accessing state data stored by the state register. - View Dependent Claims (11, 12, 14, 15, 16)
-
-
13. A non-transitory computer readable medium configured to store instructions that, when executed by a processor of a computing device, cause the computing device to perform steps that include:
-
receiving, at a simulated device interface, a host request that represents a command from a host device for accessing a state register of a simulated device that is connected to the simulated device interface; distributing the host request to a device endpoint of the simulated device interface; generating, by simulating an operation of the simulated device, a device request for accessing the state register of the simulated device; removing the host request from the device endpoint, wherein the receiving, generating, and removing are performed iteratively by concurrent threads; determining a first time at which the device request is generated, and a second time at which the host request is removed from the device endpoint; interleaving the host request and the device request into a merged sequence of requests such that, when the first time is earlier than the second time, the device request has priority over the host request; and executing requests of the merged sequence of requests in an order in which the requests occur in the merged sequence of requests, wherein the requests include instructions for accessing state data stored by the state register. - View Dependent Claims (17, 18, 19, 20)
-
Specification