The usbModel is a software model of both a USB host and device to standard USB 1.1, with hooks for USB 2.0 enhancements. Each model can be used independently, with the host model a generic implementation, and the device model an example of a specific communications device class (CDC) implementation. The models have been integrated with the VProc Virtual Processor to drive USB signals in a Verilog or VHDL simulation, with scripts for running on various open-source (Icarus, Verilator, NVC, GHDL) and commercial (Questa/ModelSim, Vivado) simulators. This allows the model to be used to drive device, hub, and host logic implementations.
![](https://private-user-images.githubusercontent.com/21970031/287150695-41ae5119-1ca6-44ed-bc0c-f7b76ad2d5cc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyMDA2MTgsIm5iZiI6MTcyNTIwMDMxOCwicGF0aCI6Ii8yMTk3MDAzMS8yODcxNTA2OTUtNDFhZTUxMTktMWNhNi00NGVkLWJjMGMtZjdiNzZhZDJkNWNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAxVDE0MTgzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEzY2NkNGE3OWJlZDllYmU5OWZjM2U0NTlkMDhiNzY5ZjdhMDFjNGQ1Y2E3ZTIzMjhhNzVjM2FjODdjZjcyNGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZnhvwApPxALzKublUIVChV0wyl0Dtc6n-fdPoMCMZQI)
- Automatic checks for connection/disconnection.
- Automatic generation of SOF token packets each frame.
- Ability to generate control transactions.
- Get device, interface, endpoint, string, and class specific descriptors.
- Set device address.
- Get device, interface, and endpoint statuses.
- Get and set device configuration (enable/disable).
- Get and set interface alternative.
- Set and clear device, interface, and endpoint features.
- Get endpoint synch frame state.
- Generate bulk and isochronous OUT packets.
- Generate bulk and isochronous IN packets.
- Suspend a device.
- Reset a device.
- Display formatted output of received packet data.
- Ability to connect and disconnect from USB line.
- Suspension detection.
- Reset detection.
- Implements a CDC device with:
- One device configuration.
- Two interfaces.
- Three endpoints.
- One a notify endpoint on one interface.
- Two data endpoints (IN and OUT) on the other interface.
- Responses to control packets.
- Bulk data transfers IN and OUT.
- A user callback can be registered at construction, called for each transfer request received.
- Display formatted output of received packet data.
![](https://private-user-images.githubusercontent.com/21970031/287150746-1cbb0edb-b50f-42c7-af89-3afb6791f045.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyMDA2MTgsIm5iZiI6MTcyNTIwMDMxOCwicGF0aCI6Ii8yMTk3MDAzMS8yODcxNTA3NDYtMWNiYjBlZGItYjUwZi00MmM3LWFmODktM2FmYjY3OTFmMDQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAxVDE0MTgzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZiZjNiZmM2N2JkYjYyZGM3M2FkZTllYmM3ZmZiN2RiZDYwMzdkOTU5NWIwNTcxMmFkNTVkYWU2MzBjOTc2MTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.cfZs-xomjZMq-VZ04b7NZMVD293bX04BM6Q3WRVldSs)