Thursday, 2017-12-07

*** tpb has joined #timvideos00:00
*** CarlFK[m] has joined #timvideos00:07
FelixVicr1901_modern: I assume you are busy - I am not sure how to proceed with the spi flash core00:09
FelixViMy thinking right now is that I can add a VHDL core that works and we could look at litex later if that's more convenient for you00:10
FelixVithe other option is to llok at the bscan files - those appear to have a working spi flash interface in fhdl00:11
FelixVimithro: How do you usually simulate cores written in FHDL?00:13
mithroFelixVi: You don't really00:13
FelixViso verification is through hardware testing?00:14
FelixVithe cores I've made so far all have test benches so that you get some level of verification from that00:14
FelixViI'm wondering if one can do the same with the spi_flash cores here to see what's going on00:15
mithroFelixVi: VHDL doesn't really have any simulators -- Verilog has Icarus and Verilator00:15
FelixVighdl, isim, modelsim work for vhdl00:15
FelixVilet me see if I can get verilog output files from litex00:16
mithroWe don't really use isim/modelsim -- you can generate the verilog and use your normal system00:17
FelixViuh - is all you get the top.v file?00:17
FelixViis there a command to just synthesize a core, but not the whole litex soc?00:22
mithroFelixVi: yes00:27
mithroFelixVi: You can generate verilog of any module log00:28
FelixVimithro: Is there any documentation for that? Or is the source the only guide?00:31
mithrohttps://m-labs.hk/migen/manual/fhdl.html#conversion-for-synthesis00:32
FelixVisweet, thanks!00:32
*** jea[m] has joined #timvideos00:33
cr1901_modernWhy do we need a separate flash core? I thought we got the litex core working. Why isn't saturn working _still_?01:05
FelixVicr1901_modern: because it doesn't boot from flash01:07
FelixVidoes not appear to be reading anything01:07
cr1901_modernFelixVi: See DM01:08
cr1901_modernFelixVi: Did you run "mkmscimg.py" by any chance?01:19
FelixViisn't that how the .bin file is generated from the toolchain?01:28
cr1901_modernOh it might be...01:28
* cr1901_modern needs to clean up his repositories and Atom projects...01:36
cr1901_modernFelixVi: I'll check the Makefile by the time you get home01:43
FelixVicr1901_modern: awesome, I think that part is fine - what bugs me is that it reads all one's from flash01:45
FelixViso we don't get to a point where a broken firmware file would matter01:46
cr1901_modernI wonder if the boot address is wrong01:46
FelixViI tried 0x200000 with bios length of 001:46
FelixViand I think the address as well as upload addres in xc3sprog are byte offsets01:47
FelixViI'll take off now and should be back in a little bit01:48
cr1901_modernFelixVi: Clearly you could always create a custom bitstream to dump relevant data for you, such as an SPIFlash dumper to test mem contents. >>01:48
cr1901_modernThere are things I could do here at home to verify that things are working01:48
cr1901_modernerm, ignore that last msg01:48
FelixViyeah, that's why I wanted to synthesize the flash controller by itself01:48
cr1901_modernBut since we both value our time and mental health, I'd just use an FTDI breakout board and logic analyzer to probe the flash mem :P01:48
cr1901_modern(which I have both of those at home)01:49
FelixVibtw, I had no luck finding the right conversion.py in litex01:49
cr1901_modernconversion.py?01:49
FelixVihttps://m-labs.hk/migen/manual/fhdl.html#conversion-for-synthesis01:49
FelixViit's convert.py, sorry01:49
cr1901_modernthere is no convert.pt01:49
FelixViI might look at that again when I get home01:50
cr1901_modernfrom litex.fhdl.verilog import convert01:50
FelixViah, so with that I can make a bitstream, put the spi_flash block on there and try to read out flash01:50
FelixVibrb01:51
FelixVi(as in about an hour)01:51
*** FelixVi has quit IRC01:51
shenkimithro: that branch appears to work for me. i forget what was failing; something to do with firmware-load I think02:17
shenkimithro: i tested them atop the litex-linux branch02:22
shenkimithro: are we going to merge that into master?02:23
mithroshenki: maybe this weekend02:24
shenkiok02:24
*** FelixVi has joined #timvideos02:43
shenkiback on the ethernet driver, i never see READER_READY (0x24) set02:53
shenkiso we hang02:53
*** rohitksingh_work has joined #timvideos03:49
mithroshenki: does the current driver use that?03:54
shenkiyeah03:55
shenkii found a bug; the address of the device had changed in the csr map03:55
shenkineed to automate the sync of those things so we don't get bitten by it03:55
*** sb0 has joined #timvideos04:10
*** FelixVi2 has joined #timvideos04:14
*** FelixVi has quit IRC04:17
shenkimithro: why did you disable the LEDs?04:28
shenkii was using them for testing. is it okay to reenable them?04:28
shenkiah, removing them is why my csr.h changed around04:28
mithroshenki: so people could write their own drivers04:29
mithroYou can revert that commit04:29
shenkiok04:29
shenkiyou need to write better commit messages :)04:29
mithroI had 10 people waiting on me to fix it :-P04:29
mithroAnd someone wasn't there to entertain them04:29
cr1901_modernmithro: https://logs.timvideos.us/%23timvideos/%23timvideos.2017-12-06.log.html#t2017-12-06T19:48:13 Thanks! Saturn is very minimal component, but it has _a lot_ of I/O,05:09
cr1901_modernand differential pairs are matched.05:09
cr1901_modernSo if someone used PMODs (Saturn supports 3 double-PMODs AFAICT), like the ones I just randomly found here: https://github.com/mithro/pmod-hdmi05:09
tpbTitle: GitHub - mithro/pmod-hdmi: HDMI Expansion Modules compatible with the Pmod standard (at github.com)05:09
cr1901_modernSaturn could be a good HDMI2USB board05:09
FelixVi2cr1901_modern: If you want a good board to add HDMI interfaces check out waxwing instead05:37
cr1901_modernENOMONEY05:37
FelixVi2similar I/O, but the connectors on them allow for proper impedance-matched connections all the way to the carrier board05:37
cr1901_modernwell, okay strictly not true, but it's the simplest explanation05:37
FelixVi2I'm just saying your signal integrity will be much better when you use a waxwing which might be important at higher resolution / fast pixel clocks05:38
FelixVi2saturn / waxwing are the same thing except for how you connect stuff to them - saturn comes with ft2232h on board but molex headers, waxwing without usb (use your own ez-sub fx2) + connectors rated for transmission lines05:40
FelixVi2either way, good night!05:41
*** FelixVi2 has quit IRC05:42
CarlFKmithro: I have a ubuntu box w/ Opsis hooked up  -   what/where is the download/flash thing?   but before I flash it I should see what ver was just used and I don't have a term program so I am going to sleep.06:23
shenki[53304.264156] usb usb1-port1: disabled by hub (EMI?), re-enabling...06:28
shenkithat's new06:28
*** sb0 has quit IRC07:16
*** jea has quit IRC11:30
*** jea has joined #timvideos11:30
*** rohitksingh_work has quit IRC12:45
*** rohitksingh has joined #timvideos13:26
*** FelixVi has joined #timvideos14:06
*** rohitksingh has quit IRC14:38
*** froztbyte has quit IRC14:50
*** juliusb has quit IRC14:50
*** CarlFK[m] has quit IRC14:50
*** msantana has quit IRC14:50
*** medicalwei has quit IRC14:50
*** Peetz0r has quit IRC14:50
*** cr1901_modern has quit IRC14:50
*** andi-m has quit IRC14:50
*** shenki has quit IRC14:50
*** Guest4752 has quit IRC14:51
*** _florent_ has quit IRC14:51
*** Ishan_Bansal has quit IRC14:51
*** deeprave has quit IRC14:51
*** shorne has quit IRC14:51
*** ysionneau has quit IRC14:51
*** micolous has quit IRC14:51
*** hobbes- has quit IRC14:51
*** CARAM___ has quit IRC14:51
*** samsagaz has quit IRC14:51
*** vys has quit IRC14:51
*** tsukasa_au has quit IRC14:51
*** xfxf has quit IRC14:51
*** FelixVi has quit IRC14:51
*** skay has quit IRC14:51
*** felix_ has quit IRC14:52
*** thaytan has quit IRC14:52
*** mikal has quit IRC14:52
*** abhas has quit IRC14:52
*** techman83 has quit IRC14:52
*** jea[m] has quit IRC14:52
*** [d__d] has quit IRC14:52
*** jea has quit IRC14:52
*** CarlFK has quit IRC14:52
*** tsglove has quit IRC14:52
*** springermac has quit IRC14:52
*** mcarden has quit IRC14:52
*** tpb has joined #timvideos14:52
*** CarlFK[m] has quit IRC14:53
*** hyadez has joined #timvideos14:56
*** Signotheque has joined #timvideos14:56
*** olasd has joined #timvideos14:56
*** tumbleweed has joined #timvideos14:56
*** mithro has joined #timvideos14:56
*** ivodd has joined #timvideos14:56
*** jimmo has joined #timvideos14:56
*** barjavel.freenode.net sets mode: +o mithro14:56
*** tsukasa_au has joined #timvideos14:56
*** xfxf has joined #timvideos14:56
*** juliusb has joined #timvideos14:57
*** froztbyte has joined #timvideos14:57
*** FelixVi has joined #timvideos14:57
*** jea has joined #timvideos14:57
*** mikal has joined #timvideos14:57
*** CarlFK has joined #timvideos14:57
*** tsglove has joined #timvideos14:57
*** skay has joined #timvideos14:57
*** felix_ has joined #timvideos14:57
*** thaytan has joined #timvideos14:57
*** springermac has joined #timvideos14:57
*** abhas has joined #timvideos14:57
*** techman83 has joined #timvideos14:57
*** barjavel.freenode.net sets mode: +vvvv CarlFK skay thaytan techman8314:57
*** [d__d] has joined #timvideos14:57
*** Kripton has joined #timvideos14:57
*** mcarden has joined #timvideos14:57
*** bunnie has joined #timvideos14:57
*** cyrozap has joined #timvideos14:57
*** Joelw has joined #timvideos14:57
*** paddatrapper has joined #timvideos14:57
*** Kamilion has joined #timvideos14:57
*** FelixVi has quit IRC15:04
*** CarlFK[m] has joined #timvideos15:37
*** rohitksingh has quit IRC16:12
*** rohitksingh1 has joined #timvideos16:12
*** jea[m] has joined #timvideos16:14
*** FelixVi has joined #timvideos16:28
abhasHi everyone -- need a bit of newbie help to update the firmware on an Opsis board. I have HDMI2USB-mode-switch installed and working. I have checked out the HDMI2USB-firmware-prebuilt.16:35
abhasI'm confused about which firmware to flash. I understand I need a .hex file and a .bit file. I tried to run the opsis-flash.sh script (from the mode-switch repo) but that only flashes a very firmware onto the opsis board.16:35
abhasI think I need to use opsis-manage-firmware to do the job and I need to pass the firmware files to it. So if someone can point out the syntax to use for this and which firmware files I should use, I can try that out.16:35
abhasAdditionally, I would be glad to document this in greater detail.16:35
*** CarlFK[m] has quit IRC16:41
*** jea[m] has quit IRC16:41
abhasI am in the process of procuring 3 more boards where I will need to update the firmware like this.16:42
CarlFKabhas: I can help in a bit..16:47
CarlFKlike 30 min o so16:47
abhassure --- that'll be great... I'll wait. please take your time.16:48
CarlFKa week ago the vm that builds ran out of disk so some builds were failing16:48
abhasI have sdcc installed as well. I can try to do a build as well.16:49
CarlFKmithro: ^^^16:50
*** abhas has quit IRC17:04
*** abhas has joined #timvideos17:07
*** mh_ has joined #timvideos17:09
*** mh_ has left #timvideos17:09
*** CarlFK[m] has joined #timvideos17:57
*** tsglove has quit IRC18:02
*** CarlFK[m] has quit IRC18:07
*** tsglove has joined #timvideos18:07
mithroabhas: Give this script a try -> https://github.com/mithro/HDMI2USB-mode-switch/blob/master/download-hdmi2usb-firmware.sh18:36
tpbTitle: HDMI2USB-mode-switch/download-hdmi2usb-firmware.sh at master · mithro/HDMI2USB-mode-switch · GitHub (at github.com)18:36
*** CarlFK[m] has joined #timvideos18:40
CarlFKmithro: https://github.com/mithro/HDMI2USB-mode-switch/blob/master/download-hdmi2usb-firmware.sh#L2518:48
tpbTitle: HDMI2USB-mode-switch/download-hdmi2usb-firmware.sh at master · mithro/HDMI2USB-mode-switch · GitHub (at github.com)18:48
CarlFKdownload-firmware.sh isn't the name of the script18:49
CarlFK$0 or soemthing is18:49
CarlFKwant me to open an issue?18:49
abhastrying it out now18:51
CarlFKv0.0.3-1045-gccb30b9-dirty is what I used last weekend18:54
CarlFKmithro: how do I set that as stable?18:55
abhasI believe its via an env variable: PLATFORM=opsis TRACK=testing ./download-hdmi2usb-firmware.sh18:56
abhasCarlFK: I've downloaded the unstable firmware. I see this file now: image-gateware+bios+firmware.bin18:59
abhasIs this what I flash onto opsis?18:59
mithroOn a bus so will be in and out19:04
mithroCarlFK: update the symlink at https://github.com/timvideos/HDMI2USB-firmware-prebuilt/tree/master/opsis/firmware19:08
tpbTitle: HDMI2USB-firmware-prebuilt/opsis/firmware at master · timvideos/HDMI2USB-firmware-prebuilt · GitHub (at github.com)19:08
*** jea[m] has joined #timvideos19:10
abhasCarlFK: I tried to run this command: sudo /usr/local/bin/hdmi2usb-mode-switch --flash-image image-gateware+bios+firmware.bin19:29
abhasbut it just gave me a bunch of errors. Before doing this, I did: sudo /usr/local/bin/hdmi2usb-mode-switch --mode jtag19:29
*** CarlFK[m] has quit IRC19:35
*** jea[m] has quit IRC19:35
CarlFKabhas: nick mithro ^^^19:39
mithroabhas: You need to put all the errors in a pastebin and link it here19:39
CarlFKalso pastebin the command and the output19:39
abhassure19:40
abhasCarlFK: This is the output: https://pastebin.com/N9HhbJH819:43
tpbTitle: [Bash] opsis flash output - Pastebin.com (at pastebin.com)19:43
CarlFKabhas: don't tell me - tell mithro19:44
abhassure...19:44
abhasmithro: I just tried to flash the opsis board with the latest pre-built firmware and got these errors with openocd: https://pastebin.com/N9HhbJH819:45
tpbTitle: [Bash] opsis flash output - Pastebin.com (at pastebin.com)19:45
CarlFKDNA = 110000001100000011000000110000001100000011000000110000001 (0x181818181818181)19:46
CarlFKthat's an indication of something19:46
abhasIs there any other compiled firmware that I can try to flash?19:54
CarlFKtry the same thing again19:56
CarlFKI think that is one of the intermittent errors that magically go away after a 2nd or 3rd try19:56
*** mikal_ has joined #timvideos19:57
abhasI actually tried it thrice. The opsis board switches off and then needs to be power-cycled after that.19:58
abhasShall I try to compile HDMI2USB-litex-firmware?19:58
*** mikal has quit IRC19:59
*** mikal has joined #timvideos20:02
*** rohitksingh1 has quit IRC20:02
*** rohitksingh has joined #timvideos20:03
*** mikal_ has quit IRC20:03
CarlFKI don't think it will help with that20:04
abhasWhat about the debconf and lca firmware directories?20:08
CarlFKabhas: I think those are like forks or branches that were made as part of fiddling for those events long ago20:12
CarlFKwe don't have great procedures for tracking what works20:12
CarlFKv0.0.3-1045-gccb30b9-dirty works, but there are 5 revs after, and the only reason I didn't try them was the build bot was having troubles20:13
abhasI think its working now... I switched the mode between jtag and serial a few times and tried to flash the image again.20:22
abhasGot some help from here: https://github.com/timvideos/HDMI2USB-mode-switch/issues/3320:22
tpbTitle: Check for common issues when flashing · Issue #33 · timvideos/HDMI2USB-mode-switch · GitHub (at github.com)20:22
CarlFKah right - I did that last week.20:25
abhashttps://pastebin.com/hqZP8tqC20:26
tpbTitle: [Bash] Opsis flash successful - Pastebin.com (at pastebin.com)20:26
CarlFKwhat OS / distro  are you using?20:26
abhasUbuntu 16.0420:26
abhasbut now the board doesn't boot up!20:26
CarlFKhow do you know?20:26
CarlFK(I am guessing it did, you just don't see what you are expecting)20:27
abhasThe blue LED doesn't light up. No usb acm messages in dmesg.20:28
*** rohitksingh has quit IRC20:28
CarlFKlet me go look at mine... brb20:28
CarlFKpulled power, waited ~5 sec, power, blue came on, and about 5 sec later goes off.20:30
CarlFKhttp://paste.ubuntu.com/26134912/  dmesg lsusb20:31
tpbTitle: Ubuntu Pastebin (at paste.ubuntu.com)20:31
abhasBut then you do see the corresponding messages in dmesg and lsusb.20:32
abhasLet me try to flash again and see if that helps20:33
CarlFKwhat does lsusb show?20:33
CarlFKmy guess is you apt installed something (openocd?) that pulled in iso-jtag-something which has udev rules that mess things up20:34
abhasSo openocd installed only 1 set of udev rules which do not conflict with the ones that hdmi2usb installed. The opsis boards USB vendor ID is unique to the hdmi2usb udev rules file.20:38
abhasI think the problem is that after flashing the board remains in the JTAG mode even after a power cycle. So this time, I switched the mode to serial. And now I get the BIOS prompt.20:42
CarlFKthe id changes20:42
CarlFKthats progress20:42
CarlFKtry help and version20:43
CarlFKworking prompt looks like: H2U 00:00:16>20:44
abhashttp://paste.ubuntu.com/26134962/20:44
tpbTitle: Ubuntu Pastebin (at paste.ubuntu.com)20:44
abhasIts still on the BIOS prompt.20:44
CarlFKtry memtest20:44
abhasthat fails too20:44
CarlFKnow you may want to try a different build20:45
abhasMemtest shows errors20:45
abhassure.20:45
abhasAn older version works just fine. This is what I get now: http://paste.ubuntu.com/26135023/20:57
tpbTitle: Ubuntu Pastebin (at paste.ubuntu.com)20:58
CarlFKprogress20:58
abhas:) Thanks a lot for the tip!20:58
CarlFKv0.0.3-1045-gccb30b9-dirty works,20:59
CarlFKsee if you can find any after that20:59
CarlFK1045 is kinda what defines before/after20:59
abhasright... because now I can't see any inputs or outputs21:00
CarlFKer, also, what you have isn't what you want21:00
CarlFKtarget: base21:00
CarlFKthat's why21:00
CarlFKhttp://paste.ubuntu.com/26135054/  target: hdmi2usb21:01
tpbTitle: Ubuntu Pastebin (at paste.ubuntu.com)21:01
abhasit works now!21:08
abhasv0.0.3-1045-gccb30b9-dirty is what I flashed and that's working fine21:09
abhasThanks a lot for your patience and help21:09
CarlFKyay21:16
CarlFKthere should be a rev after that too21:16
CarlFKthe build bot was fixed, so I would hope part of that involved it building everything21:16
abhaslet me try the next revision as well21:20
abhasthe encoder continues to show 0fps and there is no output on the encoder -- neither from input0 nor from pattern. Would this be a firmware issue?21:21
CarlFKim not sure what that number represents21:23
CarlFKdo you have something reading the uvc stream?21:23
CarlFKoh right.. there is a bug here too...21:24
CarlFKyou have to stream video before you connect the serial console21:24
CarlFKrmmod uvcvideo; modprobe uvcvideo21:25
CarlFKthat should get it un stuck21:25
abhasI tried guvcview, mplayer, vlc -- none of them are able to talk to /dev/video021:25
abhaslet me try that out21:25
*** Guest4752 has quit IRC21:41
*** puck has joined #timvideos21:44
*** tsukasa_au has quit IRC21:45
*** xfxf has quit IRC21:45
*** tsukasa_au has joined #timvideos21:50
*** xfxf has joined #timvideos21:50
*** abhas has left #timvideos22:05
*** paradisaeidae has joined #timvideos22:38
*** tsukasa_au has quit IRC22:39
*** xfxf has quit IRC22:39
*** tsukasa_au has joined #timvideos22:44
*** xfxf has joined #timvideos22:44
*** puck is now known as Guest475223:34
mithrotumbleweed: ping?23:46
tumbleweedmithro: pong23:46
mithrotumbleweed: What are the outstanding issues you were trying to fix?23:47
tumbleweedhttps://github.com/timvideos/HDMI2USB-litex-firmware/pull/341 https://github.com/timvideos/HDMI2USB-litex-firmware/pull/37523:47
tpbTitle: Use CRLF line-endings by stefanor · Pull Request #341 · timvideos/HDMI2USB-litex-firmware · GitHub (at github.com)23:47
*** sb0 has joined #timvideos23:49
mithrotumbleweed: Can you rebase onto the latest and push them and then I promise to merge them this week23:50
tumbleweedI can. But I can't test this evening, it'll only happen tomorrow23:50
tumbleweedah, master hasn't changed much, anyway. Maybe no testing needed23:51
tumbleweedthere, rebased23:54
tumbleweedmithro: do you want a new PR for CR-LF, from my repo, so it gets travis builds?23:55
mithrotumbleweed: BTW If you clone the prebuilt repo and add a GH_TOKEN to your travis, it will push to your *own* prebuilt repo...23:55
mithrobrb23:55

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