Saturday, 2018-02-10

*** tpb has joined #timvideos00:00
futarisIRCcloud_florent_: Thanks for the input. I tried synthesising a gateware for mimasv2, but it fell over. "AttributeError: 'Record' object has no attribute 'clk_p'"00:00
tpbTitle: add mimasv2 video · futaris/[email protected] · GitHub (at
futarisIRCcloudmimasv2 seems broken in latest git00:31
*** ewen has joined #timvideos02:53
futarisIRCcloudHi Ewen. I rolled back the submodules too. Just doing a rebuild again now, with the rev you said worked...03:22
ewenfutarisIRCcloud: I'm trying doing a rebuild with 7e8f01bcfce7821940911e094b1528c73f29221203:27
ewenfutarisIRCcloud: Which is about the latest date (2018-01-22) that I think I might have retested Mimas v203:27
ewenfutarisIRCcloud: (There's also a challenge that there's a Python 3.5 -> Python 3.6 transition in that time.)03:27
futarisIRCcloudYeah, I just get "LiteX SoC BIOS (" on that build too.  I think it's related to the Python 3.6 change too.03:28
ewenfutarisIRCcloud: 7e8f01bcfce7821940911e094b1528c73f292212 didn't revive my non-working board either :-(03:29
cr1901_modernlemme guess, mimas goes into the weeds after sending a few chars?03:29
ewencr1901_modern: In my case I get no obvious output at all :-(03:29
mithroewen: which PIC firmware are you running?03:30
ewencr1901_modern: But yes, crashes seems plausible.  Any ideas?03:30
futarisIRCcloudWith the older build, yes. With newer builds, nothing.03:30
ewenmithro: How can I check that?03:30
mithroNot sure - jimmo knows03:30
ewenmithro: Ah, you mean serial loader firmware.  Just the default that shipped with it.03:30
cr1901_modernewen: Make sure the integrated_ram_size has the first 12 bits cleared03:30
ewencr1901_modern: Where do I check that?03:31
cr1901_modernwe dealt with this issue last year and I couldn't figure out why it crashed03:31
mithrobblr - dinner03:31
tpbTitle: litex-buildenv/ at master · timvideos/litex-buildenv · GitHub (at
cr1901_modernAaand it already is03:31
cr1901_modernWonder if something else regressed... mimasv2 worked fine last I tried.03:32
mithroThe following line is what is needed if you have different pic firmware running ->
tpbTitle: litex-buildenv/ at master · timvideos/litex-buildenv · GitHub (at
ewencr1901_modern: Yeah, Mimas v2 definitely worked for me the week before LCA at hackfest.03:32
ewencr1901_modern: Just unsure *exactly* what version worked....03:33
cr1901_modernewen: While I couldn't figure out why the firmware crashed last year, my stopgap was to raise the amount of RAM.03:33
cr1901_modernewen: This isn't unique to mimas either. I've seen it also happen with tinyfpga and mercury as well (though in those cases I had a custom lm32_config)03:34
futarisIRCcloudI had Mimasv2 working sometime in December too.03:34
ewencr1901_modern: You think the gateware is okay and it's crashing in the firmware/BIOS?03:35
cr1901_modernewen: I don't know. My guess is the gateware miscompiled, tbh. I couldn't duplicate the issues I had last year in simulation.03:35
cr1901_modernewen: Try 0928c16. I'll test my own locally later03:41
futarisIRCcloudChanging integrated_sram_size from 0x4000 to 0x8000 stops any output from happening, on ddd71f4103:41
cr1901_modernTry commit hash 0928c16 of litex-buildenv*03:42
cr1901_modernAccording to my reflog that _should_ work?03:42
ewencr1901_modern: 1987531c9dda7068f2f1640da2555733e8357544 (merged 2018-01-16) didn't work with clean rebuild.03:43
ewencr1901_modern: It's feeling like it's tooling/buildenv related somehow.03:43
cr1901_modernewen: Well 0928c16 was on the 14th of Jan :)03:44
ewencr1901_modern: Okay, I'll try that next.03:45
ewenIIRC there were a bunch of compiler updates as well as the Python 3.5 -> 3.6 transition that happened.  So possibly that's related.  (I haven't, yet, been doing full on each one.)03:46
futarisIRCcloudMe either.03:46
cr1901_modernWell Python 3.6 support is indirectly my responsibility, since I added that feature to Migen :P03:47
cr1901_modernBut the things I fixed shouldn't have had that sort of effect (source: I had to modify 3.5 to give equivalent behavior to 3.6 and LiteX got those changes in December)03:48
ewenfutarisIRCcloud: cr1901_modern: mithro: It appears if I do "make image-flash" on 1987531c9dda7068f2f1640da2555733e8357544 it does work.03:50
ewen(But "make gateware-flash" + "make firmware-load" didn't work.)03:50
ewen(The difference being that "image-flash" flashes a combined blob of gateware + firmware + application)03:52
ewenOn that "make image-flash" version, I can then do "make firmware-connect" and it'll serial load MicroPython successfully.03:52
cr1901_modernewen: That's good to know, and yes you do need the combined image.03:53
ewenI'm going to try rebuilding with timvideos application instead, and flashing that.03:53
cr1901_modernewen: I don't actually use the Makefile to upload the firmware b/c my mimasv2 board is remote (thus I use a special script to upload)03:53
ewencr1901_modern: "make gateware-flash" + "make firmware-load" definitely worked previously, but maybe due to what had been flashed before?03:53
cr1901_modernewen: It's certainly probable. Also, IIRC, unless mithro changed it, the application itself also contains a copy of the BIOS03:54
cr1901_modernSo that copy might've been executing as well at the wrong addr or some other fun mismatch03:54
futarisIRCcloudJust synthesising 1987531c9dda7068f2f1640da2555733e8357544 now.03:55
ewenmithro: Does "make gateware-flash" also include the firmware/BIOS?  Or just gateware definition?03:57
ewen(I'm wondering if my instructions are maybe wrong, and it worked for me previously as I'd flashed something else that *did* have the BIOS in it...)03:57
futarisIRCcloudYep. image-flash with 1987531c9dda7068f2f1640da2555733e8357544 works.04:00
ewenfutarisIRCcloud: So sounding like my instructions are wrong / reliant on side effects of previous use of board.04:00
cr1901_modernif memory serves, image-flash should run w/ gateware, bios, and application, and then invoke
futarisIRCcloudewen: Possibly. Trying again on HEAD.04:01
ewencr1901_modern: Yes, that sounds right.  "make image-flash" is supposed to be gateware + bios + application in one, loaded via MimasV2Config.py04:04
ewenFTR, if I "image-flash" with timevideos H2U firmware, I can "make firmware-load" it into MicroPython, as expected.04:09
ewenfutarisIRCcloud: I'm also about to try going back to HEAD.04:09
futarisIRCcloudewen: 8528a1926987459a72e2770389652493f612e8b5 works with "make image-flash"04:10
ewenfutarisIRCcloud: Great.  I'm about to try d11f5b85e7a962b3b3e55aaee70a693159f59957 which AFAICT is latest in github timvideos/litex-buildenv04:11
futarisIRCcloudWhoops. I mean d11f5b85e7a962b3b3e55aaee70a693159f59957 works.04:11
ewenfutarisIRCcloud: Great.  I'll test it here.  And if so, I'll reword the Mimas v2 bit of the blog post to make it clear you have to do "make image-flash" once, and then can test later MicroPython builds with "make firmware-load" serialboot.04:12
ewenfutarisIRCcloud: That's the timvideos H2U C firmware.  I've also had that working in this test.04:13
futarisIRCcloudI suppose I should test FuPY too.04:14
ewenfutarisIRCcloud: I've been testing FuPy, at least building with scripts/ which builds the FuPy repository04:15
futarisIRCcloudewen: Uploading FuPy image-flash now.04:19
ewenfutarisIRCcloud: me too :-)04:19
ewenOf note, arty gateware-load loads $(TARGET_04:20
ewen... $(TARGET_BUILD_DIR)/gateware/top.bit04:20
ewenmimasv2 gateware-flash loads $(GATEWARE_FILEBASE).bin04:21
ewenwhich expands to $(TARGET_BUILD_DIR)/gateware/top.bin04:21
cr1901_modern*.bit files should only be loaded via JTAG. For hdmi2usb I don't use them often04:22
ewencr1901_modern: Yeah, on Arty it's loading via OpenOCD.04:22
ewenfutarisIRCcloud: image-flash on latest appears to work.  I'll start updating the blog post...04:22
cr1901_modernewen: Right, but you still have to write the firmware to flash, and as of right now AFAIK everything's written to the flash all at once04:23
futarisIRCcloudewen: Confirmed here too.04:24
cr1901_modern(i.e. the gateware and the application firmware)04:24
cr1901_modernThat said I haven't looked at the Makefile that closely in a while lol04:24
ewencr1901_modern: I'm fairly sure that I've previously (last year) managed to write gateware + firmware + no application, and had that work.  But possibly I was manually calling to achieve that.04:26
ewencr1901_modern: (And then assuming that "make gateware-flash" was doing that when retesting last month, when it seemed to work...)04:27
cr1901_modernWell I could actually _look_ at the Makefile to check lol. Just a bit surprised that *.bit files are used at all, since litex relies on loading the application from flash (and there is a command at the h2u prompt to flash a new firmware)04:28
cr1901_moderns/there is/will be/04:28
*** cocaine- has joined #timvideos04:29
futarisIRCcloudWell, I've now got a video target running on mimasv2, so that's something. It crashes in the hdmi2usb firmware, though...04:30
ewencr1901_modern: Yeah, now I think about it I have a feeling I've been caught out previously with "make gateware-flash" being basically useless given it needs some firmware to get started.04:30
futarisIRCcloudI don't think I've added s6 stuff correctly to the firmware.04:31
cr1901_modernI've never tried the video target on mimas, so I can't comment :(04:31
futarisIRCcloudcr1901_modern: I only wrote a video target today. ;)04:31
ewenfutarisIRCcloud: You've reached the bleeding edge then :-)04:32
futarisIRCcloudGoing to see if I can get it working. :) If not I may end up just running pacman.04:32
tpbTitle: The Answer is 42!!: PacMan running on the Mimas V2 FPGA Development Board (at
ewenfutarisIRCcloud: updated.  Can you have a quick look and see if the Mimas v2 section on "Loading the gateware and micropython onto the Numato Mimas v2" makes sense now?04:45
tpbTitle: FuPy (FPGA MicroPython) on Mimas v2 and Arty (at
ewenfutarisIRCcloud: ie, "make image-flash" except for quick tests of application.04:45
futarisIRCcloudLooks good to me04:49
ewenfutarisIRCcloud: Thanks.  I've just spotted a confusion around BIOS / Firmware which I'll fix.04:50
ewenfutarisIRCcloud: In this context BIOS is the boot loader, etc.  And "firmware" is actually the application.04:50
mithroheyo, I'm back now04:57
ewenmithro: Catch up is that my instructions were wrong.  "make image-flash" is pretty much essential.  "make gateware-flash" is not that useful for testing software builds.... (due to no BIOS)04:58
ewenmithro: Blog post updated.04:58
ewenmithro: meanwhile, it appears that if FIRMWARE=none the idea is that it'd build an image with no firmware (application), but other parts of Makefile fail when trying that.04:58
mithroewen: On the Mimas you need to do a flash because the BIOS is stored in spiflash04:58
ewenFileNotFoundError: [Errno 2] No such file or directory: 'build/mimasv2_base_lm32//software/none/firmware.bin'04:59
mithroewen: Hrm - I was sure we had fixed that04:59
ewenIn python -m -f build/mimasv2_base_lm32//software/none/firmware.bin -o build/mimasv2_base_lm32//software/none/firmware.fbi04:59
tpbTitle: Snippet | IRCCloud (at
ewenmithro: Yeah, that's the exact bit that made me think it was fixed.05:00
ewenmithro: But FIRMWARE=none make image-flash  fails earlier in the dependencies.05:01
ewenmithro: I *think* because the image file depends on $(FIRMWARE_FILEBASE).fbi even if there's going to be no firmware included...05:01
ewenmithro: Let me try tweaking that...05:02
*** shorne has quit IRC05:03
ewenmithro: Loading file build/mimasv2_base_lm32//image-gateware+bios+none.bin...05:04
ewenmithro: If it works, I'll create a pull request for the trivial change.05:04
mithroewen: On the Arty we embed the BIOS inside the gateware05:05
mithroso you can just do a gateware-load05:05
mithroThe MimasV2 is pretty much the only device which we don't have the bios embedded in the firmware05:06
cr1901_modernWell smaller boards than mimasv2 could run fupy05:07
cr1901_modernso it's still valuable to keep the option to put bios in flash05:07
ewenmithro: Should we make the Mimas v2 "gateware-flash" flash the gateware+BIOS combined image?  It seems to me that this issue has tripped me up 3 times before...05:08
mithrocr1901_modern: Yes05:08
cr1901_modernewen: I like that idea as long as it's commented.05:08
mithrocr1901_modern: All our images have the bios in flash -- just some also have it in the gateware too05:08
cr1901_modernmithro: Oh right I was misremembering the details of "why do we have two copies of the bios".05:10
cr1901_modern^ewen: Btw, it is very possible to accidentally boot up the second copy of the BIOS by accident. I don't remember how offhand tho.05:11
cr1901_modernPerhaps you were seeing that?05:11
cr1901_modernWait no, not on mimasv. I saw it on opsis*05:12
mithroWe should put a check in the BIOS which makes sure it is working on the right gateware :-P05:12
cr1901_modernProbably no harm done. Even with firmware upload from the H2U> prompt, only mimasv2 could update the BIOS for an intentional version mismatch.05:13
*** shorne has joined #timvideos05:14
mithroanyone know what "declare -s" is suppose to do in shell?05:14
ewenmithro: No.  declare doesn't seem to take "-s" in bash manpage.  Some other shell?05:19
futarisIRCcloudmithro: So it looks like I was generating the clocks at 10* for the arty VGA...05:31
tpbTitle: arty VGA output WIP by futaris · Pull Request #20 · timvideos/litex-buildenv · GitHub (at
mithrofutarisIRCcloud: That seems like an easy mistake to make05:32
futarisIRCcloudAnyhow, on mimasv2 it looks to be stuck here:05:34
tpbTitle: litex-buildenv/processor.c at master · futaris/litex-buildenv · GitHub (at
futarisIRCcloudHaven't checked on arty05:35
mithrofutarisIRCcloud: stuck in what way?05:35
futarisIRCcloudmithro: Never exits that section. Probably in a while loop05:36
tpbTitle: litex-buildenv/processor.c at master · futaris/litex-buildenv · GitHub (at
futarisIRCcloudmithro: That'd do it for mimasv2. ;)05:38
mithrofutarisIRCcloud: Maybe there should be a #warning in that ifdef path?05:38
futarisIRCcloudWell it now boots on mimasv205:42
*** suhdood has joined #timvideos05:44
tpbTitle: Snippet | IRCCloud (at
futaris[m]Not sure that I'll get a chance to work on it again today.06:01
futarisIRCcloudDidn't even use the oscilloscope or logic analyser today.06:02
ewenfutarisIRCcloud: "Debugging by thinking very hard" :-)06:03
ewenfutarisIRCcloud: mithro: I'm testing a Mimas v2 diversion of "make gateware-flash" to load gateware+BIOS.06:03
*** suhdood has quit IRC06:27
ewenfutarisIRCcloud: mithro: with both fixes.  Result is "make gateware-flash" on Mimas v2 works in a more useful way (and doesn't violate principle of least surprise).06:33
tpbTitle: Makefile: omit FIRMWARE.fbi dep if FIRMWARE=none by ewen-naos-nz · Pull Request #24 · timvideos/litex-buildenv · GitHub (at
mithroewen: LGTM!06:41
ewenmithro: Thanks!06:52
* ewen disappears off to Saturday evening...06:52
*** ewen has quit IRC06:55
*** rohitksingh has joined #timvideos07:43
*** suhdood has joined #timvideos08:11
*** Kripton has quit IRC08:21
*** Kripton has joined #timvideos08:25
*** rohitksingh has quit IRC08:25
*** suhdood has quit IRC08:32
*** futarisIRCcloud has quit IRC08:39
*** futarisIRCcloud has joined #timvideos09:05
*** rohitksingh has joined #timvideos09:49
*** futarisIRCcloud has quit IRC11:14
*** futarisIRCcloud has joined #timvideos12:11
*** rohitksingh has quit IRC14:20
*** futarisIRCcloud has quit IRC15:34
*** MaZderMind has joined #timvideos16:13
MaZderMindbeen playing around with the 1920-modelines in the hdmi2usb firmware16:14
MaZderMinddid you have [email protected] or [email protected] running on the opsis board?16:14
MaZderMinddocs says it should be fast enough to do so but i don't seem to get any of the modelines working16:15
CarlFKMaZderMind: foggy memory says "yes, but currently we can only do 5 or 10 fps"16:15
MaZderMindthe pixelclock of 1080p25 is actually lower then 720p5016:21
MaZderMindso speed should not be the problem16:21
MaZderMindi think i might just miscalculated the timings16:21
MaZderMind(code here:
tpbTitle: Comparing timvideos:master...MaZderMind:modeline-1920x1080-at-25-and-24 · timvideos/HDMI2USB-litex-firmware · GitHub (at
CarlFKdoes vocto have and tests ... im trying to send an image in and out of the Opsis and see if what comes out is expected16:23
MaZderMindwhat do you mean by "have and tests"?16:29
CarlFKdo you have some code that compares 2 images and returns a pass/fail16:31
CarlFKoh.. /and/any16:31
MaZderMindah, no, voctomix has no integration tests like that16:33
MaZderMindbut there were some in the gst-switch repository16:33
CarlFKoh yeah - thanks16:35
MaZderMindcan't find them16:35
MaZderMindit's quite long ago :)16:35
MaZderMindoh dear, three years OO16:35
CarlFKbah. bunch of c code :p16:38
MaZderMindi'll see if i can check the timing wirh a scope17:20
MaZderMindthe firmware for the hdmi2usb is quite crashy, isn't it? ie. with wringly decoded characters on the uart or incorrectly formatted modelines17:20
CarlFKit is solid for 720p production - not surprised that other things aren't solid17:25
CarlFKcharacters on the uart - sounds like the bug if you send chars too fast it drops them?17:26
*** suhdood has joined #timvideos17:40
CarlFK[m]mithro (IRC): there are hdmi2usb builds for both Atlys and Opsis on this rev:
tpbTitle: HDMI2USB-firmware-prebuilt/archive/master/v0.0.4-122-gbc7feb5 at master · timvideos/HDMI2USB-firmware-prebuilt · GitHub (at
CarlFK[m]mithro (IRC): there are 3 builds after that, no hdmi2usb for either Atlys or Opsis17:43
CarlFK[m]mithro (IRC): is this anything I should bother pointing out, or do we just wait for another rev and hope it builds?17:44
*** suhdood has quit IRC17:47
*** suhdood has joined #timvideos17:47
*** suhdood has joined #timvideos17:49
*** suhdood has quit IRC18:05
mithroCarlFK[m]: yes - check what happened on travis18:22
tpbTitle: HDMI2USB-firmware-prebuilt/archive/master/v0.0.4-144-gd11f5b8/atlys/hdmi2usb/lm32 at master · timvideos/HDMI2USB-firmware-prebuilt · GitHub (at
tpbTitle: HDMI2USB-firmware-prebuilt/archive/master/v0.0.4-144-gd11f5b8/opsis/hdmi2usb/lm32 at master · timvideos/HDMI2USB-firmware-prebuilt · GitHub (at
mithroMaZderMind: Yes we should be able to do 1080p25 or 1080p30 on the IO pins -- however nobody tests with that frequently so it is likely broken18:24
CarlFK[m]mithro (IRC): where do I see travis logs for the ones that didn't build?18:53
mithroCarlFK[m]: and
CarlFK[m]mithro (IRC): NameError: name 'clk_polarity' is not defined19:00
mithroCarlFK[m]: Yeah - that looks like the build was actually broken19:01
CarlFK[m]im guessing that has been fixed?19:01
mithroCarlFK[m]: check the latest builds19:05
CarlFK[m]mithro (IRC): um.. I have about 10 min till I need to run, so I am ignoring that...19:06
CarlFK[m]mithro (IRC): hdmi2usb-mode-switch -v --flash-image image-gateware+bios+firmware.v0.0.4-144-gd11f5b8.atlys.hdmi2usb.lm32.bin19:07
CarlFK[m]AssertionError: serial mode only valid on the opsis.19:07
CarlFK[m]any hints on how to get the atlys to behave ?19:08
mithroCarlFK[m]: The serial mode **is** only valid on the opsis?19:09
CarlFK[m]mithro (IRC): right - so I can't use that trick to get the atlys unstuck19:10
mithroCarlFK[m]: yes19:10
CarlFK[m]mithro (IRC): power cycle seemed to fix it.19:12
CarlFK[m]mithro (IRC):   flashed  image-gateware+bios+firmware.v0.0.4-144-gd11f5b8.atlys.hdmi2usb.lm32.bin - now term programs (flterm, tio) connect, but I don't get any chars.19:32
mithroCarlFK[m]: which serial port are you connecting too?19:32
CarlFK[m]out of time now, I can look more in 5 or so hours.19:32
CarlFK[m][email protected]:~/temp$ flterm --port /dev/ttyVIZ019:32
CarlFK[m][FLTERM] Starting...19:32
CarlFK[m]im off - see ya19:42
*** CarlFK has quit IRC19:42
MaZderMindmithro: thank you. I'll try my best to fix it *reads up on his hdmi specs* – lot's of hidden complexity here21:26
*** danielki has quit IRC21:40
*** bunnie has quit IRC21:40
*** froztbyte has quit IRC21:40
*** juliusb has quit IRC21:40
*** olasd has quit IRC21:40
*** xfxf has quit IRC21:40
*** deeprave has quit IRC21:41
*** mithro has quit IRC21:41
*** Ishan_Bansal has quit IRC21:41
*** cyrozap has quit IRC21:41
*** mithro has joined #timvideos21:45
*** deeprave has joined #timvideos21:45
*** Ishan_Bansal has joined #timvideos21:45
*** cyrozap has joined #timvideos21:45
*** sets mode: +o mithro21:45
*** futaris[m] has quit IRC21:48
*** olasd has joined #timvideos21:48
*** xfxf has joined #timvideos21:48
*** danielki has joined #timvideos21:48
*** bunnie has joined #timvideos21:48
*** froztbyte has joined #timvideos21:48
*** juliusb has joined #timvideos21:48
*** nbags[m] has quit IRC21:48
*** ducky[m] has quit IRC21:48
*** CarlFK[m] has quit IRC21:49
*** jea[m] has quit IRC21:49
*** micolous[m] has quit IRC21:49
mithroMaZderMind: what are you seeing happen?22:01
*** micolous[m] has joined #timvideos23:11
*** CarlFK[m] has joined #timvideos23:36
*** nbags[m] has joined #timvideos23:36
*** futaris[m] has joined #timvideos23:36
*** jea[m] has joined #timvideos23:36
*** ducky[m] has joined #timvideos23:36

Generated by 2.13.1 by Marius Gedminas - find it at!