Friday, 2017-11-03

*** tpb has joined #timvideos00:00
shornehello, last time I built the gateware I had hacked up the build to find Vivado in "/opt/shorne/software/xilinx-2017.3/Vivado/2017.3/..."01:10
shorneI am tyring to make this corret now, I found the 'toolchain' path is set in 'enter-env.sh' but it doesn't seem to allow me to set things up for Vivado01:11
shornehow are others getting around this?  Should I patch enter-env.sh for Vivado?  Or do I need to do something else01:12
shorneok... I patched enter-env.sh something like01:14
shorne if [ ! -z "$XILINX_DIR" ]; then01:15
shorne-       export MISOC_EXTRA_CMDLINE="-Ob toolchain_path $XILINX_DIR/opt/Xilinx/"01:15
shorne+       export MISOC_EXTRA_CMDLINE="-Ob toolchain_path $XILINX_DIR"01:15
shornethen i do export01:15
shorneexport XILINX_DIR=/opt/Xilinx/Vivado01:15
shorneand it works fine01:15
shorneI think thats the right thing to do01:15
mithroshorne: I recently changed way it finds Vivado, you should just be able to use '/opt/Xilinx' if you update to the latest...01:59
shornemithro: ok, updating to master now02:19
shornemithro: every time I update to latest I do... git pull origin master, but do I need to do something to get the sub modules?02:21
shornei.e. ./scipts/download-env.sh again?02:22
mithroshorne: in theory the Makefile should fix them for you, but you will have to force third_party/litex back to that other branch02:22
mithroMaybe take a look at https://github.com/mithro/HDMI2USB-litex-firmware/tree/litex-linux ?02:23
tpbTitle: GitHub - mithro/HDMI2USB-litex-firmware at litex-linux (at github.com)02:23
shornemithro: yeah, because sometimes I have changes in the submodules as I hack on this02:25
mithroshorne: Okay, we should try and get your changes upstream if they are useful :-)02:25
shornewell, sometimes its just adding print to see see whats going on02:27
mithroAhh okay02:28
shornemithro: I think the branch litex-linux is already merged to master02:34
shorneThis commit seems to break things for me 6dca7084daf817efb52f930be7a9bc35cfc223e402:34
shorne-       export MISOC_EXTRA_CMDLINE="-Ob toolchain_path $XILINX_DIR"02:34
shorne+       export MISOC_EXTRA_CMDLINE="-Ob toolchain_path $XILINX_DIR/opt/Xilinx/"02:34
shornebecause, inside the litex builder litex looks for a verion directory directly under 'toolchain_path'02:35
shornebut my version directory is '/opt/Xilinx/Vivado/2017.3/...'02:35
shorneI want to set 'toolchain_path' to '/opt/Xlinix/Vivado'02:36
mithroshorne: https://github.com/enjoy-digital/litex/commit/e07bd71b16932a504b7435a96901a3b0eb5a99cd02:36
tpbTitle: build/xilinx: Fixing settings finding. · enjoy-digital/[email protected] · GitHub (at github.com)02:36
shornemithro: ok, that submodule update is not getting pulled in02:37
shornelet me double check02:38
shorneahh, its there now02:38
shornemithro: ok, I did a submodule update manually and it came in, not sure why it didnt come in during the regular build02:39
shorneok, well I was going to work on arty but I realized I didnt plug in the arty at home and I am out of town right now02:42
shorne:)02:42
mithroThe arty is small enough to travel with you :-P02:44
shenkiI took mine on this trip :)02:48
shorneyeah, but I dont have the environment setup on my laptop02:49
shorneI should do that, a lot of friends have been asking me to demo this stuff02:50
shenkioh? cool :)02:50
shenkimithro: liteeth doesn't do dma, does it?02:50
mithroshenki: I thought it did - but maybe not by default?02:52
shenkiok. i was just reading the docs02:52
mithroshenki: Not sure02:54
mithrohttps://github.com/enjoy-digital/liteeth/blob/master/liteeth/frontend/etherbone.py02:55
tpbTitle: liteeth/etherbone.py at master · enjoy-digital/liteeth · GitHub (at github.com)02:55
mithrohttps://github.com/enjoy-digital/liteeth/blob/master/liteeth/frontend/tty.py02:55
tpbTitle: liteeth/tty.py at master · enjoy-digital/liteeth · GitHub (at github.com)02:55
mithroThere seems to be a crossbar type thing...02:56
mithrohttps://github.com/enjoy-digital/liteeth/blob/master/liteeth/core/udp.py02:57
tpbTitle: liteeth/udp.py at master · enjoy-digital/liteeth · GitHub (at github.com)02:57
mithroBut it would be pretty easy to do a DMA I think?02:57
shenkiok03:08
shenkimithro: do you get the performance you need for hdmi2usb without dma? (does hdmi2usb do ethernet these days?)03:08
mithroIt only does ethernet for control03:08
shenkiok03:14
mithroshenki: You should be able to telnet to port 22 and get the HDMI2USB> prompt...03:27
mithro(On both the Arty and the Opsis)03:27
shenkiok. ping works :)03:31
shenkiSuccessfully downloaded 3887612 bytes from boot.bin over TFTP03:31
shenkiUnable to download cmdline.txt over TFTP03:31
shenkiNo command line parameters found03:31
shenkiUnable to download initrd.bin over TFTP03:31
shenkiNo initial ramdisk found03:31
shenkiExecuting booted program at 0x4000000003:31
shenkinothing after that tho03:32
shenkimithro: which tree should I test?03:32
shenki(kernel tree)03:32
mithroshenki: https://github.com/mithro/linux-litex/tree/litex-minimal I think?03:33
tpbTitle: GitHub - mithro/linux-litex at litex-minimal (at github.com)03:33
cr1901_modernmithro: Did you know that TinyFPGA B has a USB bootloader in Verilog? I knew it could be done (USB 1.1 on FPGA) but I still find it utterly fascinating.03:35
mithrocr1901_modern: Yes03:35
cr1901_modernThat must've been an absolute pain to debug03:35
mithrocr1901_modern: Why USB1.1 has good sigrok support and has been done like a bunch of times before03:36
* cr1901_modern adds USB transceiver to migen bucket list03:36
mithrocr1901_modern: Talk to rohit, he's already doing a USB2.0 core thingy...03:36
cr1901_modernOh nice!'03:37
mithrocr1901_modern: https://github.com/rohitk-singh/usb-device03:37
tpbTitle: GitHub - rohitk-singh/usb-device: USB 2.0 Device IP core using Migen with out-of-box AXI Slave Interface (at github.com)03:37
mithrocr1901_modern: I have a design for doing a PHYless USB2.0 with Spartan 6 SERDES03:37
mithrocr1901_modern: https://github.com/mithro/soft-utmi03:38
cr1901_modernmithro: Are you trying to break the natural order like azonenberg does for Ethernet :P?03:38
tpbTitle: GitHub - mithro/soft-utmi: A "soft" (VHDL) implementation of the UTMI+ PHYs specification using the SERDES found in Xilinx Spartan-6. (at github.com)03:38
cr1901_modernmithro: Maybe I'm just naive. USB has overwhelmed me a few times, but I'm less stupid now than I was back then03:38
cr1901_modernAdditionally I'm not sure if the LA I bought is fast enough to debug USB 1.1 (24MHz)03:39
cr1901_modernUSB 1.1 is what, 12Mbps?03:39
mithroshenki: I keep getting confused what we should be using - so I've put it all in a script -> https://github.com/mithro/HDMI2USB-litex-firmware/blob/litex-linux/scripts/build-linux.sh :-P03:39
tpbTitle: HDMI2USB-litex-firmware/build-linux.sh at litex-linux · mithro/HDMI2USB-litex-firmware · GitHub (at github.com)03:39
shenkihah, that google drive url03:40
*** rohitksingh_work has joined #timvideos03:41
cr1901_modernrohitksingh_work: Just learned that apparently you're doing a USB 2.0 core in Migen. Is that including the PHY/bitstuffer part?03:42
shenkimithro: you're missing the signed-off-by for your jump to reset commit03:42
shenkioh. ive already got that in my tree03:43
rohitksingh_workcr1901_modern: Hi! :) No, it doesn't include PHY/bitstuffing/serialization etc. It has ULPI interface instead.03:44
cr1901_modernrohitksingh_work: Was just wondering. That's still cool though. AIUI, USB 2.0 PHY can't really be done w/ FPGA I/O alone unless you're mithro03:44
cr1901_modernUSB is a bit overwhelming for me, tbh. I'd like to fix that tho03:45
shenkimithro: can we wire up one of the arty buttons to reset the CPU?03:45
mithroshenki: Sure!03:45
mithroshenki: What do the two red buttons do?03:46
shenkithe one on the usb connection side of the board resets the FPGA03:46
shenki(so you lose the gateware)03:46
mithroshenki: Also "make gateware-load" is so fast, I just do that....03:46
mithro"make tftp && make gateware-load && make firmware-connect"03:47
shenkioh, the other one resets the cpu03:48
shenkithe one labeled "RESET"03:48
mithro:-P03:49
shenkihttps://pastebin.com/raw/H2UbRUab03:49
rohitksingh_workcr1901_modern: Indeed! Only mithro can attempt those pushing-the-boundary kind of techniques! :p03:52
mithroOr maybe I'm only crazy + silly enough ;-)03:52
mithroActually Hamster is much better at it then me03:52
shenkimithro: i thought that shorne's changes meant i should get to userspace?03:54
mithroshenki: I believe you should, but I have not tested shorne's changes...03:54
mithroshenki: Oh wait, you get a console in Qemu03:54
mithroshenki: I'm getting something similar on real hardware -- see "Latest update... Console in qemu!" email03:55
shenkidoh03:55
shenkiben explained how to write a network driver to me last night03:56
shenkiand he's free to help me this afternoon03:56
shenkibut i need a console03:56
mithroUse qemu03:56
shenkido we have a model for the network device?03:56
mithroyes03:56
shenkiok03:56
mithroyou can even tftpboot it03:56
*** puck has quit IRC04:03
*** puck has joined #timvideos04:08
shorneshenki: your final output "Executing booted program at 0x40000000" is what I get too when I was booting the kernel on arty05:12
shenkishorne: you get this:05:14
shenki[    7.280000] b[  =[    7.280000g[    7.290000] s[    7.300000] i[    7.300000] i[    7.340000] r05:14
shenki?05:14
shorneno, I havent see that last time I tried05:14
shenkiah ok05:14
shenkiwith the changes you sent on top of my litex-minimal branch, that's what I get05:14
shenkiI've started hacking on the network driver. Too tired to think about serial :D05:15
shorneI see your output, its failing right when we switch from bootconsole to the real console05:15
shenkiyeah05:15
shorneI am pretty sure there are some more problems in serial, my fixes were enough to get qemu running05:16
shornebut I was suspecting it would need some more work for real hardware05:16
shenkiperhaps something funky with irqs? getting interleaved printk output when there's only one CPU is strange05:16
shenkiyeah05:16
shorneyeah, the realconsole doesnt use IRQs05:16
shornealso, I think there is something different in the hardware IRQs i.e. its level based vs edge or something05:17
shornehardware vs qemu05:17
shornebut good we get output up until that pointI can debug when I get back home05:18
shenkiok05:18
shornesorry... I mean "the boot console doesnt use irqs"05:18
shenkiyeah, i follow :)05:18
_florent_shenki: we don't have DMA for now in liteeth, just N RX/TX buffers (N is configurable but set to 2 by default)08:08
_florent_shenki: all the stuff mithro was showing for liteeth is only use with the udp/ip hardware stack, which is not what we are using here with linux (only the mac)08:09
_florent_shenki: here are 3 different drivers if that can help:08:09
_florent_https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/libnet/microudp.c08:10
tpbTitle: litex/microudp.c at master · enjoy-digital/litex · GitHub (at github.com)08:10
_florent_https://github.com/enjoy-digital/liteeth/tree/master/liteeth/software/liblwip08:10
tpbTitle: liteeth/liteeth/software/liblwip at master · enjoy-digital/liteeth · GitHub (at github.com)08:10
_florent_https://github.com/enjoy-digital/liteeth/tree/master/liteeth/software/libuip08:10
tpbTitle: liteeth/liteeth/software/libuip at master · enjoy-digital/liteeth · GitHub (at github.com)08:10
_florent_if hardware preamble/crc is enabled, you will no need to handle that in software08:11
_florent_init: https://github.com/enjoy-digital/liteeth/blob/master/liteeth/software/libuip/liteethmac-drv.c#L3508:14
tpbTitle: liteeth/liteethmac-drv.c at master · enjoy-digital/liteeth · GitHub (at github.com)08:14
_florent_we clear the interrupts, set the rx/tx buffer addresses, set the current rx/tx slots, set the current rx/tx buffers08:15
_florent_send packet : https://github.com/enjoy-digital/liteeth/blob/master/liteeth/software/libuip/liteethmac-drv.c#L6908:16
tpbTitle: liteeth/liteethmac-drv.c at master · enjoy-digital/liteeth · GitHub (at github.com)08:16
_florent_set data, set slot, set length, wait the sram_reader to be ready, then start the xfer08:17
_florent_then  update txslot/txbuffer08:17
_florent_receive packet (polling): https://github.com/enjoy-digital/liteeth/blob/master/liteeth/software/libuip/liteethmac-drv.c#L5208:18
tpbTitle: liteeth/liteethmac-drv.c at master · enjoy-digital/liteeth · GitHub (at github.com)08:18
_florent_similar to tx in the reverse order08:18
_florent_i hope that can help, have fun :)08:20
*** rohitksingh_work has quit IRC12:42
*** rohitksingh has joined #timvideos13:23
*** rohitksingh has quit IRC13:38
*** CarlFK has quit IRC13:52
*** CarlFK has joined #timvideos14:25
*** ChanServ sets mode: +v CarlFK14:25
*** rohitksingh has joined #timvideos14:53
mithro_florent_: Thanks!16:58
*** rohitksingh has quit IRC17:31
*** samsagaz has joined #timvideos19:32
*** CarlFK has quit IRC20:02
*** CarlFK has joined #timvideos20:39
*** ChanServ sets mode: +v CarlFK20:39
*** samsagaz_ has joined #timvideos20:52
*** samsagaz has quit IRC20:54
*** samsagaz__ has joined #timvideos21:45
*** samsagaz_ has quit IRC21:47

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