Giter Site home page Giter Site logo

Comments (6)

ktemkin avatar ktemkin commented on July 19, 2024

Oh! I think when we spoke earlier I didn't get that you were using some of the SoC examples. Those don't currently work on fomu; because the SoC example chosen implements a hardware UART, rather than a virtual one.

If you're trying to use this with a virtual serial device, that'd require implementing a simple SoC peripheral that, in turn, interfaces with LUNA's simple ACM virtual-serial, as here:

https://github.com/greatscottgadgets/luna/blob/master/examples/usb/acm_serial.py

from luna.

ktemkin avatar ktemkin commented on July 19, 2024

A (more complex) example of a peripheral is provided here:

https://github.com/greatscottgadgets/luna/blob/master/luna/gateware/usb/usb2/interfaces/eptri.py

You'd theoretically need to wrap LUNA's USBSerialDevice with a Peripheral, and then add e.g. a CSR (register) you can use to send data. I think that'd be a super interesting example -- feel free to open a feature request. :)

from luna.

ktemkin avatar ktemkin commented on July 19, 2024

I'm closing this since it's not technically a bug; I'd love to have this referenced in a new feature request, though, if you're willing to write one. :)

from luna.

mithro avatar mithro commented on July 19, 2024

@ktemkin - I think @tcal-x wants to use the LUNA core to handle the USB serial side and LiteX to provide the CSR peripherals. I /think/ the best way is to set up LUNA to provide a byte-FIFO like interface similar to what the FTDI ICs provide, then connect that to the LiteX byte UART peripheral which would normally talk to something like the FTDI IC? Does that make sense?

from luna.

mithro avatar mithro commented on July 19, 2024

My poor attempt at doing a diagram is shown at https://docs.google.com/drawings/d/1JMEMoRK5CP7TDy4U9-tuYUZqEjzRmwVNJWENpQxgR9g/edit
LUNA verse external FTDI used in LiteX SoC

from luna.

tcal-x avatar tcal-x commented on July 19, 2024

Thanks @ktemkin , yes we chatted a bit on discord (1bitsquared). So yes, things are working as expected, not a bug. I think I did have success with the acm_serial.py design. Also, loopback.py didn't meet timing with the default pnr seed, but did meet timing with --seed 198.

I do have a working solution on Fomu with valentyusb and I think tinyusb, hooking into the uart / putc / printf stack (I hope that makes sense, I'm still figuring things out). But I'd love to get to the same point with Luna too. I'm not sure which if any pieces are missing.

from luna.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.