[Libre-soc-dev] maybe buy fpga for adding to our ci server

Jacob Lifshay programmerjake at gmail.com
Wed Apr 6 18:20:13 BST 2022

On Wed, Apr 6, 2022, 09:58 lkcl <luke.leighton at gmail.com> wrote:

> On April 6, 2022 3:21:29 PM UTC, Jacob Lifshay <programmerjake at gmail.com>
> wrote:
> >On Wed, Apr 6, 2022, 03:30 lkcl <luke.leighton at gmail.com> wrote:
> >
> >> On Wed, Apr 6, 2022 at 12:02 AM Jacob Lifshay
> ><programmerjake at gmail.com>
> >> wrote:
> >> > orangecrab can do usb serial emulation...
> >>
> >> that means that someone has to spend the time writing a USB port,
> >> because after having been treated so abusively by the lead developer
> >> of litex i'm not letting litex source code onto the server
> >
> >
> >didn't realize valentyusb was litex...
> it's mostly migen with a little bit litex
> https://github.com/im-tomu/valentyusb/blob/master/valentyusb/usbcore/cpu/usbwishboneburstbridge.py
> which means at some point removing litex and using valentyusb standalone
> (or converted to nmigen) is doable.
> the only thing being, USB is quite... hairy.  as in, BIG. setting up the
> drivers (endpoints) is something of a pain in the ass.

iirc valentyusb already handles all that for you...you just need to access
the usb serial device from the linux host, wire the serial fifo interface
to a memory-mapped address in the hdl, and use the trivially simple driver
(simpler than uart, so *really* simple) to run it. look at the 3d game
branch of microwatt for an example -- though I'd probably want to add an
interrupt handler for fifo-full so the extra input can go into a memory
buffer rather than crashing since iirc the interrupt wasn't disabled but
has no sw handler (oops, guess that's part of why the PR I based it off of
was marked as a draft).

> i created a USB 1.1 Keyboard with an STM32F years ago: setting up the
> endpoint map took several days research.

that's waay more complex since the stm32f (i presume) doesn't automatically
handle all the usb stuff for you, you have to tell it all the properties of
the usb device you want, valentyusb handles that all for you afaict.

> >k, sounds good, though I'll probably want to wire it to the build
> >server's
> >internal rs232 port instead (iirc it's a header on the motherboard --
> >can
> >easily build the required level-shifting)...why waste a perfectly good
> >serial port?
> because if you break it, that's really expensive.  FT232 USBUARTs on the
> other hand are cheap.
> > also allows me to put the fpga inside the server's case
> >which
> >is important for protection from stuff accidentally falling on
> >it...it's in
> >the corner of my bedroom.
> i'm reasonably certain you should find the USB sockets on the front panel
> will be detachable from the case.

i'd just use an internal usb header...simpler. iirc i already have the
header to usb a adaptor. alternatively i can just pass the usb cables
through a pcie slot on the back of the case and plug it into a usb socket
on the back.


More information about the Libre-soc-dev mailing list