Sunday, 2020-05-17

*** tpb has joined #tomu00:00
*** CarlFK has quit IRC03:36
*** TheJJ has quit IRC05:55
*** TheJJ has joined #tomu06:21
*** krogozinski has quit IRC06:46
*** krogozinski has joined #tomu06:48
*** pmp-p has joined #tomu10:01
*** bibor has quit IRC11:06
*** TheJJ has quit IRC15:07
*** TheJJ has joined #tomu15:13
*** CarlFK has joined #tomu15:28
*** emeb has joined #tomu15:37
*** TheJJ has quit IRC16:26
*** acathla has quit IRC16:57
leonsPretty new to Fomu here. I'm trying to build a Verilog device running on Fomu and somehow establishing a serial communication link to my Linux PC. What would be the "best" / easiest way to do this? Etherbone?17:03
tntetherbone is ... ethernet ?17:04
leonsI have some (very theoretical) background in FPGA but no practical experience - written a lot of VHDL, but only ever simulated, never seen the magic happen. Want to get it off the ground with Fomu17:05
leonsI thought I could use etherbone to interface with wishbone from applications?17:05
tntSo the fomu doesn't have any hw expect the fpga, which mean to make it appear as a "serial device" to the pc, you need a USB core and either logic or software running on a softcore driving that usb core to respond appropriately to all the usb specificiation requests and implement the CDC specification.17:08
tnts/expect/except/17:08
tntSo as a starting point you can use the default fomu soc which has a riscv core and a usb controller there and modify the software and gateware to pipe data to some custom core you'd add to it off a wishbone bus.17:10
*** acathla has joined #tomu17:11
tntI know Greg Davill also made a fully hardware version that implement cdc without a softcore, maybe check his github, not sure what the state of it. Also this was tested on ecp5 which is way faster than a up5k so no idea if his implementation meets timing at all on there.17:12
leonsThat's what I thought. As far as I know the USB is implemented with the RISC-V Softcore, right? I was thinking about having my verilog run as just another device on the wishbone bus17:12
leonsI was kind of hoping I could use the Wishbone USB bridge without the accompanying softcore and just have my custom core on the bus, along with the bridge17:15
tntthe usb is implemented like on a classic microcontroller with usb. You have some usb dedicated logic that handles the lower level of USB but the higher level part of the stack is run on the riscv.17:15
tntI know xobs also implemented a "dummy" version that just enumerated, that might be enough for the wishbone bridge to work, I have no clue, never looked into that.17:17
*** acathla has quit IRC17:19
*** acathla has joined #tomu17:19
leonsOh, I think the litex/workshop_rgb.py does exactly what I want to do! How could I've missed that... Now to figure out how to use Verilog instead of migen17:22
tntyou'll probably still have to use litex/migen to the "top level", but you can tell it to manually add verilog file to the build list and then use a Instance(...) to manually instanciate your verilog logic in the litex topleve.17:24
leonsThat would've been my next step :) Thanks for the help, this is all pretty new for me17:25
*** TheJJ has joined #tomu18:04
leonstnt: After reading over documentation and some LiteX code I still can't figure out how to introduce my verilog into the build process (`18:50
leons\csrecho' is not part of the design. Do you have a hint here?18:50
tntnot really sorry ... I don't actually use litex, I only know its "high level architecture".18:53
tntThe VexRISCV cpu used in it is actually a verilog core (well ... a spinalhdl core really but generated the verilog for inclusion in litex) so maybe you can look how they did that as an example ?18:54
ovfthis is some glue around tinyfpga's usbserial that gets it running on fomu, including the rgb demo: https://github.com/stef/nb-fomu-hw18:55
tpbTitle: GitHub - stef/nb-fomu-hw: non-blinky fomu hello world (fpga usb uart demos) (at github.com)18:55
tntThat's really not a great code / example to reproduce ...18:57
tntit missed timing by like 30%18:57
tntand AFAIR violates several parts of the usb specification.18:57
ovfindeed, it would be nice to have an improvement on that which would share the property of not having a lot of magic (i.e. the complete verilog source for that one is <2kloc)18:59
tntyeah, adding a standalone mode to my usb core to get easy usb -> fifos interface is on my TODO list ...19:02
leonstnt: soc.platform.add_source did the trick! :)19:10
tntleons: :)19:31
*** CarlFK has quit IRC19:59
*** CarlFK has joined #tomu20:06
*** bibor has joined #tomu20:20
*** TheJJ has quit IRC21:22

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!