Sunday, 2019-04-07

*** tpb has joined #tomu00:00
*** xkapastel has quit IRC00:01
futarisIRCcloudmithro / Anyone in the USA: https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.com%2Fulk%2Fitm%2F19288072120900:55
futarisIRCcloudCheck out @wren6991’s Tweet: https://twitter.com/wren6991/status/111463794220150784400:56
futarisIRCcloudhttps://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.com%2Fulk%2Fitm%2F20264529385700:58
futarisIRCcloudAnyone else in Australia want one?00:59
xobsAmosSam: that's a good point -- I should get it building on the rpi itself, since we have an actual compiler there.02:48
*** futarisIRCcloud has quit IRC03:02
xobs<AmosSam "xobs: i'm trying to build foboot"> I've fixed it so now it properly builds on Raspberry Pi.  I'm running a test synthesis now, and I've updated the git repo with a tagged "v1.0" release.06:13
*** rohitksingh has joined #tomu06:15
*** rohitksingh has quit IRC07:05
*** rohitksingh has joined #tomu07:09
AmosSamxobs: will try when I come home... do you have any idea why example (from sw folder) won't flash?07:14
xobsAmosSam: Foboot [currently] is more of a failsafe bootloader.  You'd use it to load something that would load a real, more flexible bootloader.07:17
xobsIt deals with FPGA bitstreams.  The "sw" folder is RISC-V code, which the FPGA can't directly run.07:17
xobsI suppose, then, the next step is to come up with the real version of Foboot that supports Python and RISC-V, in addition to ICE40 bitstreams.07:18
AmosSamSo, with dfu-util is to upload ice40 bitstreams, not riscv binaries?07:20
xobsThat is correct.07:21
*** futarisIRCcloud has joined #tomu07:21
AmosSamOk, thx07:29
*** jas4711 has quit IRC09:17
*** futarisIRCcloud has quit IRC09:50
*** AmosSam has left #tomu09:52
*** AmosSam has joined #tomu09:53
*** futarisIRCcloud has joined #tomu10:20
futarisIRCcloud_florent_: If I run a litex bridge on a tomu, can I connect multiple tomus together? Is there any limitation on how many devices can be attached to a bridge?10:21
xobsfutarisIRCcloud: What is it you're looking to do?10:23
xobsThe litex bridge simply exposes Wishbone to Ethernet.  The way it's currently written, it accept()s one connection, then relays that to the Fomu.10:24
futarisIRCcloudSplit some logic between fomu boards. Theoretically, it is possible to bridge stuff back and forth, no?10:31
xobsIt should be, yeah.  Though I haven't written the USB bridge stuff yet.10:33
*** rohitksingh has quit IRC10:34
futarisIRCcloudxobs: Did you see https://github.com/smunaut/ice40-playground/commit/9cf400b9ad8baf33a3acdf98433dfd585fdb23f0 ?10:35
tpbTitle: projects/riscv_usb: Import RISCV + USB prototype · smunaut/[email protected] · GitHub (at github.com)10:35
futarisIRCcloudhttps://github.com/smunaut/ice40-playground/blob/master/cores/usb/doc/mem-map.md10:36
tpbTitle: ice40-playground/mem-map.md at master · smunaut/ice40-playground · GitHub (at github.com)10:36
xobsfutarisIRCcloud: I didn't. How does it work?10:39
futarisIRCcloudxobs: I haven't got an icebreaker, but it looks like enumeration works at least. Best to ask tnt on #yosys ...10:41
tnt... I'm here too10:45
tntfutarisIRCcloud: you should be able to run it on fomu too.  I ran foboot on the icebreaker :p10:46
xobstnt: how does the bridge work? and what is it bridging?10:46
tntyou mean bridge.v ?   Mostly it's just glue logic to convert the picorv32 memory interface to a couple of BRAM (for boot), a couple of SPRAM (main app) and a wishbone bus for the peripherals (including USB core, SB_SPI, SB_LEDDIP, ...)10:48
xobsAh, okay. Somehow I thought it was an out-of-band bridge to put Wishbone on the USB bus.  That'll be one of the next things I work on.10:54
tntHow would that work ?10:56
xobsIt would look for a SETUP packet with a special bRequest, then read the address from wValue/wIndex.  If it's a WRITE, then a 4-byte OUT value would come next.  If it's a READ, then a 4-byte IN packet would be queued.10:58
futarisIRCcloudtnt: Cool. One of these days I'd like to run RFNoC or something similar on fomu for SDR DSP purposes. Have you got any DSP happening on ICE40 yet?10:59
xobsfutarisIRCcloud: there is limited dsp inferrence in Yosys, and I have an open bug on getting it working with the Vexriscv multiplier.11:02
xobsWoo, the new "heap" placer is super nice.  It manages to route the 48 MHz domain at 60 MHz.11:04
tntyeah, I've been using it for the past 4 months or so :p11:04
tntfutarisIRCcloud: I have some prototyping done but nothing running on real HW yet  (CIC / FIR).11:05
xobsI need to rebuild the rpi image with support for it. I just rebuilt my Windows instance of nextpnr-ice40 with it.11:05
futarisIRCcloudhttps://github.com/YosysHQ/yosys/issues/882 ?11:05
tpbTitle: Better inference of the ICE40 SB_MUL16 blocks · Issue #882 · YosysHQ/yosys · GitHub (at github.com)11:05
tntand I don't rely on inference at all.11:05
xobsfutarisIRCcloud: that's the issue I opened, yes.11:06
futarisIRCcloudhttps://en.m.wikipedia.org/wiki/Cascaded_integrator–comb_filter / https://en.m.wikipedia.org/wiki/Finite_impulse_response11:07
tpbTitle: Cascaded integrator–comb filter - Wikipedia (at en.m.wikipedia.org)11:07
futarisIRCcloudtnt: Ok. Let me know where you've put the code.11:07
tntnowhere yet11:08
tntlooking at that yosys issue ... well the 3 other mults are not something the DSP blocks can do AFAICT.11:11
xobsThat's true, but apparently Icecube2 does it somehow.  I should look into how they do it.11:12
futarisIRCcloudhttps://mobile.twitter.com/oe1cxw/status/109864799644565913611:14
tpbTitle: Twitter (at mobile.twitter.com)11:14
*** rohitksingh has joined #tomu11:15
futarisIRCcloudHi rohitksingh11:16
rohitksinghfutarisIRCcloud: hi! :)11:17
rohitksinghhave only some time left, 10% battery without charger, travelling outside :p11:17
*** rohitksingh has quit IRC11:26
AmosSamxobs: yosys from git has -dsp option, and when I installed it on my laptop, foboot build succedded without any modifications!14:05
AmosSamAlso, on rpi i builds C code, but crashes on bitstream generation, I think because of ram size... i'll try adding swap...14:06
AmosSamBut still, I cant flash blink sample from fomu-test with dfu-util, still gives unknown error, usually at 0 bytes, sometime 256 or event 512 bytes...14:07
xobsAmosSam: I wonder what's causing that reliability problem. Maybe a spi issue.14:08
AmosSamSoft or hardware problem? Because, with fomu-flash same blink example works...14:10
xobsInteresting. Huh...14:10
xobsThat rules out hardware. Maybe it's a USB stack issue.14:11
AmosSamCan I do something to test it?14:14
xobsTry building it by adding the --with-pll argument?14:26
xobsOr try reverting https://github.com/xobs/valentyusb/commit/65292f0adbe688bda27f0b202cba9bea28de0d14 in hw/deps/valentyusb14:29
tpbTitle: rx: pipeline: try shortening fifo to 8 · xobs/[email protected] · GitHub (at github.com)14:29
*** emeb has joined #tomu15:00
xobsAmosSam: I'm still wondering if it's an issue with the bit-banged spi.15:12
xobsOh, wait, I know.15:12
AmosSami just builded it with-pll and will try15:13
xobsAmosSam: Can you update your copy of fomu-flash?15:13
AmosSamFomu-flash?15:13
xobsWhat are you using to write the SPI?15:14
AmosSamFomu-flash from rpi image15:14
AmosSamNow im clonning repo and will build new15:15
xobsYou can try installing it from https://github.com/im-tomu/fomu-pi-gen/blob/master/stage2-fomu/04-fomu/files/fomu-flash_1.3.deb?raw=true15:16
xobs(I feel like I need to set up an apt repo now...)15:16
AmosSamBuild is done, just wait minute till I solder wires to fomu....15:17
xobsDepending on the vintage of your rpi image, it may not properly set the SPI flash pins correctly after the rpi programs it.15:17
xobsOh, is it disconnected?15:17
xobsOkay, nevermind on that idea then.15:17
xobsHmm.15:17
xobsI thought you had the wires connected already.15:17
xobsIt could be as simple as MOSI and MISO being swapped.15:18
AmosSamNo worries, I know them to ceonnect them...15:18
xobsI thought maybe you had run into https://github.com/im-tomu/fomu-flash/commit/1b0feb297f2946508b3ded7235d9a22f4bbec0da -- but that couldn't be the case since you don't have the Pi connected.15:21
tpbTitle: spi: leave pins as "input" on exit · im-tomu/[email protected] · GitHub (at github.com)15:21
xobsWhat kind of machine are you running these tests on?15:27
AmosSamOk, foboot build with with-pll, cloned fomu-flash repo and flashed top-multiboot.bin with newly build fomu-flash, and result is same15:28
AmosSamJea, I flash fomu with rpi, and test it on laptop with arch linux.. does version of dfu-util matters?15:30
xobsOkay, so the good (?) news is that the USB is consistent, which makes me think it's not a problem with the USB stack.  It keeps generating dfuERROR (10) / errUNKNOWN (14)?15:31
AmosSamYes15:33
AmosSamNow, I'm trying with reverted last commit on valentyusb15:34
*** xkapastel has joined #tomu15:40
xobsAnything in dmesg?15:41
xobsNow I'm back to thinking it's a USB issue.  I say this because dfu_get_status() in dfu-utils sets the error by default to errUNKNOWN, and never re-sets it if it doesn't manage to transfer 6 bytes.15:42
mifuneim getting the same error, dfu-util either manages to download nothing or a couple of blocks15:45
xobsOkay, the good news is that I've managed to replicate the issue.15:46
xobsI think there's an incompatibility with XHCI.15:47
*** futarisIRCcloud has quit IRC15:50
AmosSamOk, with reverted commit in valentyusb from second try, dfu-util uploaded 4352 bytes...15:51
AmosSamAnd with that reverted commit, bitstream doesn't build with --with-pll15:52
AmosSamDmesg is clean, nothing after enumeration of device15:53
AmosSamAnd dfu-util errors at different upload progresses, max currently is 11264 bytes15:54
AmosSamOk, on usb3 port max upload is 512 bytes, on usb2.0 11264 bytes15:55
AmosSamOk, when flashing with dfu-util on rpi, it works!!15:59
AmosSamAnd then plugged fomu in laptop, and it booted in dfu mode, and after dfu-util -e it stated blink example16:00
AmosSamxobs: it kinda works!16:01
xobsAmosSam: yay! it just doesn't work with PCs.16:01
xobsBut that's okay, because now I can fix that.16:01
AmosSamIt seems, and I have lenovo x230 (with coreboot if that matters) on which dfu is not working...16:02
AmosSamI'll now reset foboot and it's submodules and try to flash vannila bitstream16:02
xobsIt's not working on my Fedora server, either.16:03
AmosSamAnd my rpi is 1st gen, if that matters16:03
mifunegoing to try with a gen3 when it has updated16:05
xobsWell, I managed to blow /something/ up.  Still trying to figure out what, exactly.16:06
xobsMight be the rpi, might be a Fomu board, hopefully it's not the Beagle.16:06
xobsupdate: it's not the Beagle.16:07
xobsWell that'll do it.  The Fomu is responding with an empty data packet.16:08
AmosSamAnd that's ok?16:09
xobsNo, which is why it's strange that it's different between the PC and the Pi.16:09
mifunepi3 upload works16:10
AmosSamSo, rpi is ignoring that packet and continues to send data? Or vice versa?16:10
xobsUnclear. Maybe the Pi is slow enough that it doesn't matter?  Or maybe the usb_ep_0_in_ibuf_empty_read() call is returning incorrectly.16:11
mifunedfu-util -e does nothing16:12
mifuneor, makes it blink slowly, instead of loading the blink bin i uploaded16:13
AmosSamFor me it worked, from breath led to just blink red... you have to watch it or can change color in blink example?16:14
mifunei made my own that does rgb blink16:14
mifunehttps://github.com/pimdegroot/Fomu-rgbblink16:15
tpbTitle: GitHub - pimdegroot/Fomu-rgbblink: RGB blink code for the Fomu hacker board (at github.com)16:15
mifunewhich looks like https://twitter.com/mifune/status/111175042551293952116:16
xobsSo one of two things is happening: either it's sending a usb_ack(), or somehow the transmission is getting truncated.16:18
xobsI'm not sure which it is, and it's getting kinda late here,16:19
xobsBut this is something I can track down.16:19
* xobs uploaded an image: image.png (98KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/elLFYXbDenIccsqjkYGYBWUb >16:20
AmosSamIs this problem only on hacker version?16:22
xobsNo, I see it on the EVT board, too.16:22
AmosSamThats "good" then...16:23
xobsYes.  I'll fix it in the morning!16:24
xobsThanks for the help in tracking it down.16:24
AmosSamOne more thing, now i'm flashing modified version of blink, and instead of rebooting fomu, i accidentally started download again, and it'muuuch slower16:24
AmosSamDon't know if that matters16:25
AmosSammifune: I modified blink example to blink in success all three leds, and after issuing dfu-util -e it works...16:29
mifuneit seems to work, but it drops back into the bootloader16:33
AmosSammifune: i cloned your repo, and flashed it with dfu-util and it works16:51
*** emeb has quit IRC17:24
mifuneok, weird17:25
AmosSamAlso, I have latest fomu-flash, and foboot bitstream with reverted last commit in valentyusb submodule17:26
AmosSammifune: did you tried with latest fomu-flash?17:27
mifunei updated everything, did not revert the commit in valentyusb17:28
AmosSamFoboot is generated with --with-dsp flag, and --revision hacker17:32
mifunenope, same behaviour17:58
AmosSamWell, that's all i know... but here it still blinks...18:00
mifuneok, weird. different usb port and now it does work18:07
AmosSamDifferent for flashing or running??18:13
mifunei can flash with the one closest to ethernet, i can flash and run with the other set18:23
AmosSamStrange...is any of them usb3?18:23
mifuneno18:24
mifuneit only fails on the top one, not the other three18:25
AmosSamI have 2 usb3 and 1 usb2 ports, and flashing fails on all of them18:35
mifunei only have it working on the pi, btw. thinkpad 13 with xubuntu 18.04 still fails18:36
AmosSamBut once flashed, it works on all three ports on laptop..18:37
AmosSamI have arch linux, up to date, on x230. Only interesting thing is that on usb3 ports, after dfu-util -e in dmesg there are few message that says unable to enumerate usb device, what doesn't happen in usb2...18:40
mifuneah, after flashing it also works on my laptop18:42
mifuneall usb 318:42
mifunei guess the dmesg messages are because the fomu suddenly drops off the usb, as blink doesn't have a usb core18:43
*** kuldeep has quit IRC18:45
AmosSamYea, but that doesn't happen on usb2...18:49
*** kuldeep has joined #tomu18:51
mifuneanyway, i destroyed another fomu, this time by chipping the flash with a pogo pin. Time to quit for today.19:12
tnt"another" ?19:21
mifunefirst one i accidentely teared of a pad with a soldered wire.19:24
*** rohitksingh has joined #tomu19:39
*** awe00 has quit IRC20:54
*** futarisIRCcloud has joined #tomu21:30
*** xkapastel has quit IRC21:49
*** xkapastel has joined #tomu23:00

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