commit | e18d88b3093fcbcd37f470e8244bd0050b48b5c1 | [log] [tgz] |
---|---|---|
author | Alexander Williams <awill@google.com> | Fri Jan 21 16:30:39 2022 -0800 |
committer | tjaychen <timothytim@google.com> | Tue Feb 01 16:46:41 2022 -0800 |
tree | 127fe48e167d4dfba553a481250532b83739e4bf | |
parent | 349cc4dc7d867e3d4cbaf1ad819bbfaa961b2d0a [diff] |
[usbdev] Fix up packet responses for compliance Add endpoint enable and stall registers, and correct responses for unimplemented or disabled endpoints. Also correct behavior for SETUP packets coming on non-control endpoints. IN and OUT endpoints can be independently stalled, so they get independent software control. Likewise, distinguish between endpoints that are disabled (i.e. ignore transactions) and those that simply NAK. Also add the spec-provided timeout for host responses. Detect the start-of-packet (idle-to-K transition) and ensure it occurs within 18 bit times (with some fudging of numbers, since this should be at the device's pins and is likely more liberal). Clean up the register documentation for handling transaction handshakes. Clean up the signal naming to reflect the correct terms, such as referring to transactions instead of transfers. Adjust the DIF and legacy usb code to use the new registers. Also delay connecting the USB device to the bus until the default endpoint is set up. Tweak hello_usbdev to wait for the host to configure the USB device before proceeding to the main loop. Adjust the DPI code to better track the timing of responses to some control requests, in addition to preventing the DPI instantiation from locking itself out due to gating the function call that enables the sense with a signal that depends on VBUS sense. Tested hello_usbdev on FPGA and Verilator. Signed-off-by: Alexander Williams <awill@google.com>
OpenTitan is an open source silicon Root of Trust (RoT) project. OpenTitan will make the silicon RoT design and implementation more transparent, trustworthy, and secure for enterprises, platform providers, and chip manufacturers. OpenTitan is administered by lowRISC CIC as a collaborative project to produce high quality, open IP for instantiation as a full-featured product. See the OpenTitan site and OpenTitan docs for more information about the project.
This repository contains hardware, software and utilities written as part of the OpenTitan project. It is structured as monolithic repository, or “monorepo”, where all components live in one repository. It exists to enable collaboration across partners participating in the OpenTitan project.
The project contains comprehensive documentation of all IPs and tools. You can access it online at docs.opentitan.org.
Have a look at CONTRIBUTING and our documentation on project organization and processes for guidelines on how to contribute code to this repository.
Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).