Tuesday, 2019-07-30

*** tpb has joined #tomu00:00
*** rohitksingh_work has joined #tomu04:38
*** hegemoOn has quit IRC04:48
*** hegemoOn has joined #tomu04:55
*** rohitksingh_work has quit IRC07:09
*** rohitksingh_work has joined #tomu08:30
*** im-tomu_ has joined #tomu09:07
*** im-tomu has quit IRC09:08
MadHackerhttps://hackaday.com/2019/03/20/introducing-the-shitty-add-on-v1-69bis-standard/ I had not seen this before, but I'm kind of there for it. Tomu/fomu to v1.69bis Shitty Add-On standard adapter? :)09:32
MadHackerLittle sad that standard is not pmod-compatible too, though.09:34
*** Kitlith_ has quit IRC10:02
*** Kitlith_ has joined #tomu10:02
xobsIt's almost pmod.  Almost.10:19
xobsAlso, I'm redesigning the USB interface so it can have an arbitrary number of endpoints.10:20
xobsI was having a lot of trouble with the migen simulator (1) being slow, and (2) not dealing with clock domains well at all.10:20
xobsSo I'm in the process of learning cocotb, which has the nice property that much of the Python code just works: https://github.com/xobs/valentyusb/blob/tri-fifo/sim/test-eptri.py10:21
tpbTitle: valentyusb/test-eptri.py at tri-fifo · xobs/valentyusb · GitHub (at github.com)10:21
MadHackerFor my little play-about 6502 thing, I was just doing test in verilog-space after calling the migen converter.10:28
MadHackerNot used the migen test infrastructure, although I gather it's perfectly functional.10:29
xobsMadHacker: that's what I'm doing, too.  I transform the migen code to Verilog, then I access that from Cocotb.10:29
MadHackerA 10-second google says cocotb looks nice though.10:29
xobsI expose the wishbone signals and the USB signals (and some clock signals as well) out the top module, and interact with it that way.10:30
MadHackerOK. Can it poke at internals?10:30
MadHackerOr do you have to explicitly expose everything?10:30
xobsI suppose it could, but migen mangles names when it builds.10:30
xobsThe closest I can do is get memory addresses for things on the Wishbone bus, and control things that way.10:31
MadHackerOne of my friends has a CPUless GDB stub in verilog for this sort of thing actually.10:32
xobsThat's a neat hack.  I'm sure it runs nicely under Verilator.10:32
MadHackerConnect it up to the bus as a bus master or to the CPU's register bank and you can poke whatever you like via gdb.10:32
MadHackerIt does. Works for his Amiga accelerators mostly.10:33
tntxobs: micropython on the fomu, were you running it from flash or loaded in sram ?11:32
xobstnt: flash - it comes to around 130k, so it won't fit into ram.11:36
tntxobs: ok. I was looking at porting micropython to the icebreaker too with tinyusb and my core, but ATM it's 80k without the usb stack (using compressed instruction set) and there is no modules basically ...11:42
xobsI think I got it down to about that much, but you're right there's not much you can do with that.11:43
tntDid you create modules to allow to control the fomu hw ?11:52
xobsA few. Overall it was a proof of concept.12:08
xobsI'll build a better version once I have the USB stuff working to the point where I can have more than two endpoints.12:09
xobstnt: https://github.com/xobs/micropython/tree/fomu?files=112:10
tpbTitle: micropython/ at fomu · xobs/micropython · GitHub (at github.com)12:10
tntxobs: what's the issue atm with more than 2 ep ?12:24
xobstnt: the current USB system, `epfifo`, takes 200-400 LCs per endpoint.  So something like circuitpython, which has 8 IN and 8 OUT endpoints, really is not doable.12:26
*** rohitksingh_work has quit IRC12:48
xobstnt: how does your method work?  I seem to recall you said it allowed for arbitrary operations.13:12
tntxobs: you mean my usb core ?  Well, there is just no logic at all that's "per end point", all the states is stored in a RAM, nothing in register.13:18
tntSo when a setup token is received, it goes look up all the info it needs for that transaction (ep type, status, packet size, if there is data pending, ...) and when the transaction is done, it writes back all the result and state (liek DT, ...).13:20
xobsThat sounds useful!  And maybe that's what mithro was trying to do with "epmem".13:21
tntxobs: alternatively you could also just wrap my core in migen :p   jk.13:23
xobsWell, I'm now very certain the PHY stuff is good, and the MAC stuff can be played with.13:25
xobsAnd now that I have this cocotb testbench, I can get to work on finding a better USB<->CPU interface.13:25
MadHackerHow many USB cores do we have? ;)13:30
MadHackerNow I want to see if I can pack one into this HX1K. :D13:31
xobsMadHacker: for valentyusb, there's one PHY layer, with two well-supported MAC layers and a third MAC layer that I'm working on.13:31
xobsYou might be able to trim some stuff and get the "dummyusb" working on an HX1K.  I think it's about 1400 LCs unoptimized.13:32
xobs...but that'll get you a full Wishbone bus as well.  Maybe tnt has one that is more suitable for it.13:32
tntWell, I don't have an equivalent of dummyusb, my core needs a softcore to run the stack. Maybe the SERV riscv running off flash could fit.13:34
tnt(usb core itself is < 600 LCs)13:34
xobsAlso, on the HX1K you might be able to just stick it all in the 48 MHz domain, which could save some LCs.13:35
MadHackerMm. Context, apart from generic "playing with stuff" - I build blinky light controllers for the events industry. Mostly tiny microchip PIC based widgets. 8-bit cores are just fine for what I do, but they need reprogrammed in situ often, so USB would be handy. Rather than use a fatter processor for some of the bigger jobs, I could use an FPGA with some proper peripherals for the LED driver bits, and a very13:36
MadHackersmall softcore.13:36
MadHackerThe smaller the FPGA I can use the better. The HX1K is overkill on the small thing, of course.13:36
xobsWell, that's what the dummyusb core was designed to do -- provide a Wishbone master and nothing else.13:36
xobsSee https://github.com/xobs/teardown2019-workshop/blob/master/litex/workshop_rgb.py for example13:37
tpbTitle: teardown2019-workshop/workshop_rgb.py at master · xobs/teardown2019-workshop · GitHub (at github.com)13:37
MadHackerSure, but wishbone itself is already much bigger than I need. 8-bit processors are fine for this.13:37
xobs(I really need to move that elsewhere...)13:37
ssbthere is also https://github.com/avakar/usbcorev in Verilog  (don't know how it is related to other works)13:37
tpbTitle: GitHub - avakar/usbcorev: A full-speed device-side USB peripheral core written in Verilog. (at github.com)13:37
MadHackerI did a quick port, just to try it out, of Arlet's CPU's ALU to migen yesterday. That went easy, so I might do a migen'd up 6502 for fun, too.13:38
MadHackerObviously an ALU is trivial, but it was OK for setting expectations of difficulty.13:38
MadHackerThanks for the links, I'll take a nosey.13:39
MadHackerAlso got that thing down to 783LCs with RAM and ROM BTW. My support logic was crap.13:44
*** emeb has joined #tomu14:29
*** rohitksingh has joined #tomu15:35
*** deltab has quit IRC16:24
*** xkapastel has joined #tomu16:27
*** kcnickerson___ has quit IRC16:30
*** deltab has joined #tomu16:32
*** kcnickerson___ has joined #tomu16:35
*** kcnickerson____ has joined #tomu16:57
*** kcnickerson___ has quit IRC16:58
*** rohitksingh has quit IRC17:58
*** mifune has joined #tomu19:15
*** xkapastel has quit IRC20:06
*** im-tomu_ has left #tomu20:24
*** im-tomu_ has joined #tomu20:24
*** im-tomu_ has left #tomu20:28
*** im-tomu_ has joined #tomu20:28
*** xkapastel has joined #tomu22:01
*** im-tomu_ has left #tomu22:10
*** im-tomu_ has joined #tomu22:10
*** spacekookie has quit IRC22:38
*** spacekookie has joined #tomu22:39
*** emeb has quit IRC23:49

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!