On USB HID, Keyboard LEDs, and device emulation (2024)
10 days ago
- #USB HID
- #Embedded Systems
- #FPGA
- Added keyboard and mouse support to BoxLambda using NAND2Mario's usb_hid_host core.
- Extended the original usb_hid_host core to support controlling USB keyboard LEDs.
- Implemented a USB keyboard and mouse emulator for simulation testing.
- BoxLambda's current features include Ibex RISC-V core, VGA graphics, audio, SD card support, and more.
- The NAND2Mario usb_hid_host core simplifies USB HID device interfacing without needing a full USB stack.
- USB HID Boot Protocol (USB HIDBP) is used for simplicity, supported by basic keyboards and mice.
- Keyboard LED control involves sending a SetReport message via a Control Transfer.
- Extended the UKP processor in usb_hid_host to support branching and external inputs for LED control.
- Added a Wishbone frontend and Clock Domain Crossing (CDC) logic for integration into BoxLambda.
- Used Pbing's USB HID device emulation for testing, which employs a J1 processor running Forth.
- Simulation setup includes emulated keyboard and mouse connected to usb_hid_host instances.
- BoxLambda's clock and reset domains were expanded to include USB functionality.
- Developed a USB HID HAL and test case for software interaction with USB devices.
- Demonstrated USB HID functionality on both Verilator and FPGA with keyboard LED control.