Monday, 2018-12-10

*** tpb has joined #timvideos00:00
mithrotannewt: I've made it so you can read the last token, should let you tell if the data is a setup packet or a data packet00:46
mithroxobs: What command are you running?00:48
xobsmithro: ./make.py00:48
xobsOr CPU=lm32 ./make.py00:48
mithroxobs: You don't run ./ directly00:48
mithroxobs: make gateware00:48
mithroxobs: make firmware00:48
mithroor similar00:48
mithroxobs: What instructions told you to run ?00:49
xobsmithro: nothing, but nothing says to run "make" either, and other projects such as netv2 and the genesys2-soc have you running a python command directly, so it seemed the most logical thing to do.00:51
mithroGuess we should link to
tpbTitle: Using · timvideos/litex-buildenv Wiki · GitHub (at
mithroxobs: There is also
tpbTitle: HowTo FuPy on iCE40 Boards · timvideos/litex-buildenv Wiki · GitHub (at
mithroxobs: litex-buildenv is closer to the old style like arty-soc ->
tpbTitle: GitHub - enjoy-digital/arty-soc: Digilents Arty SoC based on LiteX (at
mithroxobs: Replacing the Makefile with might make sense sometime in the future01:14
tannewtMithro. Will it ack the setup packet whenever it’s received? The peripheral shouldn’t wait for the buffer be set. It’s should capture immediately, ack and interrupt that one was received01:18
mithrotannewt: Okay, I think I might have stall working....02:16
*** samsagaz has joined #timvideos02:57
xobsmithro: okay, I'm at the office now and I have my Fomu boards.  Let me see if I can replicate your environment on my laptop.04:08
*** futarisIRCcloud has joined #timvideos04:10
mithroxobs: First step would be to get micropython going04:12
tpbTitle: HowTo FuPy on iCE40 Boards · timvideos/litex-buildenv Wiki · GitHub (at
*** Kripton has quit IRC04:13
mithroxobs: Icebreaker is probably the closest....04:13
*** Kripton has joined #timvideos04:17
futarisIRCcloudxobs: Is says Fomu has 2MiB of flash. That's double what's on TinyFPGA BX right?04:24
tpbTitle: Tomu FPGA | Crowd Supply (at
xobsfutarisIRCcloud: did I put down 2 MiB?  I was planning on using a 2 MiB flash chip, yeah.  But I know that family has larger sizes, so it remains to be seen what we end up going with.  And that does look like it's double what's on TinyFPGA BX, according to their CS page.04:26
mithrotannewt: ping?04:30
mithrotannewt: Should get a lot less NAK on SETUP now, still working on letting SETUP packets just reset the fifo04:31
tannewtmithro, cool! I may have time tonight to try it04:48
mithrotannewt: Maybe we could turn on the other functionality too?04:52
mithrotannewt: What number of endpoints do we need?04:52
futarisIRCcloudmithro: You should only need three endpoints for CDC. One interrupt, two bulk.05:02
*** rohitksingh_work has joined #timvideos05:20
tannewtmithro, what do you want to do with it?05:21
mithrotannewt: All the examples?05:21
tannewtwe only have the one I think05:21
tannewtnot exactly sure the count05:21
tannewtsamd has 8 bidirectional05:21
mithrotannewt: so, tinyusb is stalling endpoint 0 -- that seems wrong?05:26
tannewtits because we don't support the high speed descriptor request05:27
mithrotannewt: I guess you just don't stall SETUP packets - you can still STALL a IN/OUT transaction on EP0?05:29
mithrotannewt: Do you need "Isochronous Transfers" ?05:30
tannewtnot yet05:30
tannewtI think hid uses interrupt05:30
mithroFrom a device point of view - is there actually any difference between interrupt and bulk?05:31
tannewtnot that I know of05:31
mithrotannewt: Shall we try enabling the other modes?05:32
tannewtdo you have cdc working?05:33
xobsTrivia fact: You can't have Bulk endpoints on a LS device.  MIDI requires Bulk endpoints.  If you simply redefine them as Interrupt endpoints, Windows, Linux, and Mac all will let you have a LS MIDI device.05:33
mithrotannewt: I've currently configured it for ep0=bidir, ep1=in and ep2=out05:33
mithrotannewt: Is that enough for cdc?05:35
tannewtI think so05:35
mithrotannewt: It's pretty easy to change...05:35
mithrotannewt: How do I figure out how tinyusb needs the endpoints to look like?05:36
tannewtI'd print out from edpt_open05:37
tannewtor look in the auto-desc file05:38
mithroHrm, now I'm getting a failure to program again....05:41
tannewtenabling other stuff like MSC will take more space05:41
mithroUnable to open serial port: Input/output error05:45
mithro[105654.423013] cdc_acm 2-13.1.3:1.0: acm_port_activate - usb_submit_urb(ctrl irq) failed05:45
mithrotannewt: How do I make an ep_addr?05:50
tannewtits the epnum with the direction mask05:51
mithrotannewt: you don't have a macro which takes a direction + number?05:51
mithrotannewt: Any idea what06:01
mithroprocess_set_config: 463: failed06:01
mithroIs that the highspeed?06:03
mithroI'm not seeing any calls to open either...06:05
mithroWell, I think that is me for the night06:19
mithrotannewt / xobs: I pushed the latest usb code06:20
xobsmithro: still bringing up fupy. with the 48 mhz clock it's not meeting timing (yay!), so I'm trying to figure out how to convince migen that cd_sys is actually 16 MHz (since I'm running it through a PLL)07:16
tannewtmithro, what all did you push?07:19
tannewtgot it, valentyusb and tinyusb it uses07:28
tannewt(for those following along)07:28
_florent_xobs: hi, for your constraint it should be something like: platform.add_period_constraint(self.crg.cd_sys.clk, 62.5)07:32
xobs_florent_: thanks! I managed to get it to work by saying `platform.default_clk_period = 1/16e-3` in the "_CRG(Module) -> __init__()" definition in my platform's ``07:33
_florent_xobs: ok good, if the 16Mhz is directly from the board, that's probably better yes07:38
tannewtmithro, the stall state needs to be reset on endpoint 0 when a setup token is received07:59
tannewtI tried to figure out how to do it in valentyusb but quickly got lost08:00
tannewtI tried to clear the stall when receive the setup packet but its too late, the host has already given up08:01
tannewtkeep working at it though! I think setup tokens are one of the trickier parts08:02
tannewtendpoint 0 also stalls in the both directions I think too08:02
tannewt(the trace is from total phase's data center program)08:04
xobsWoo, progress.  I got litex to build on fomu.08:54
xobsAnd I get a serial prompt.08:54
xobsAnd micropython works.  Cool!09:01
cr1901_modernxobs: Excellent work09:03
*** sb0_ has quit IRC09:26
*** sc00bz1 has joined #timvideos09:31
*** sc00bz has quit IRC09:32
*** rohitksingh_work has quit IRC10:34
*** rohitksingh_work has joined #timvideos10:35
*** futarisIRCcloud has quit IRC10:59
*** rohitksingh_work has quit IRC11:17
*** waldo323 has joined #timvideos11:44
*** rohitksingh_work has joined #timvideos11:46
*** waldo323 has joined #timvideos11:54
*** tsglove has quit IRC13:06
*** tsglove has joined #timvideos13:17
*** rohitksingh_work has quit IRC13:29
*** cr1901_modern1 has joined #timvideos13:46
*** cr1901_modern has quit IRC13:49
*** samsagaz has quit IRC14:05
*** rohitksingh has joined #timvideos14:07
*** rohitksingh has quit IRC14:24
*** rohitksingh has joined #timvideos14:27
*** Kripton has quit IRC14:48
*** Kripton has joined #timvideos14:50
*** sc00bz1 is now known as Sc00bz14:57
*** cr1901_modern1 has quit IRC15:00
*** cr1901_modern has joined #timvideos15:00
mithrotannewt: it's almost like every decision that USB did makes it hard to create a low resource usage hardware16:30
tpbTitle: The VexRiscV CPU - A New Way to Design | Electronics etc… (at
mithroxobs: FYI, nextpnr mostly ignores constraints at the moment16:33
mithroxobs: this is on your business card one, right?16:33
mithroxobs: using the RPi?16:34
cr1901_modernbusiness card?16:34
mithrocr1901_modern: ice40 FPGA business card :-)16:34
cr1901_modernmithro: Ahhh cool, how does one get one of those if I can't make a trip to Singapore :P?16:35
cr1901_moderncc: xobs :P16:35
cr1901_moderntinyfpga uses a MachXO2 business card16:35
daveshahmithro: strictly speaking it doesn't ignore them, all the algorithms just make use of them16:43
daveshahIt's just atm it pretty much optimises for overall max Fmax16:44
daveshahBut the timing opt pass I added recently definitely cares about them in a relative sense now16:44
mithrodaveshah: Well, there is no way to pass multiple timing domains at the moment, only the Python API right?17:01
daveshahmithro: that is the primary constraint format for nextpnr17:02
daveshahEven once we have things like timing driven rip up in the router that's how we'll recommend constraints to be specified17:02
mithrodaveshah: Everything else on the planet uses a variant sdc17:02
daveshahWe might also support vendor formats in the future for cross compatibility17:02
daveshahBut the Python API will allow nice powerful constraints17:03
daveshahParticularly once you get to things like false paths17:03
daveshahThe SDF parser will probably use the Python API in fact17:04
daveshahThis stuff tends to be easier in Python than C++ and isn't perf critical17:05
*** rohitksingh has quit IRC18:09
cr1901_modernmithro: Have you ever used this for your projects? https://landscape.io18:24
tpbTitle: Landscape :: Hosted continuous Python code metrics (at
mithrocr1901_modern: I have played with it18:25
cr1901_modernFound it by accident, looks interesting, if a bit aging18:25
cr1901_modernmithro: Ahhh I see... I just signed up for it and it shows me a few of your old builds18:33
cr1901_moderninclude something called flumotion18:33
cr1901_modernI figured you maybe had used it before because you have other automated flows on your repos such as automatically adding Github labels and the TODO bot18:36
mithrofor the github labels I use probot autolaber18:49

Generated by 2.13.1 by Marius Gedminas - find it at!