Friday, 2018-07-06

*** tpb has joined #timvideos00:00
*** swalladge has quit IRC00:39
*** swalladge has joined #timvideos00:41
*** sb0 has joined #timvideos03:06
*** rohitksingh_work has joined #timvideos03:57
*** sb0 has quit IRC05:31
*** sb0 has joined #timvideos06:58
*** rohitksingh_work has quit IRC07:19
*** rohitksingh_work has joined #timvideos07:20
*** rohitksingh_work has quit IRC07:30
xobsCan I get some Python help?  I'm trying to port the debug bridge from C to Python, and I'm having trouble formatting data.07:31
xobsThe format of the packet is {uint8_t, uint8_t, uint32_t, uint32_t}, but when I do 'struct.unpack("?II", data)' it complains "unpack requires a buffer of 12 bytes".  Why is "?II" or even "BII" a 12-byte struct?  Shouldn't it be 9 bytes?07:32
daveshahThis is because C structs usually have alignment bytes for fast access07:32
xobsdaveshah: Right, I declare my C struct as __packed__.07:33
daveshahYeah, IIRC you have to add a character at the start to tell Python unpack that07:34
daveshah= or < I think07:35
xobsThat gives "bad char in struct format"...07:37
xobsOh, okay.  It needs to be the first character.07:37
xobsIs there a Python equivalent of "uint32_t"?  The struct documentation seems to indicate that "I" can vary depending on the system.07:38
cr1901_modernor better yet, the compiler :'D07:38
daveshahI think the solution for that is to use I but make sure you have it set to standard size mode07:39
cr1901_modernerm I didn't even know python could handle __packed, and I don't know if there's an equivalent to uint32_t07:39
daveshah= or < at the start should do that07:39
xobsHooray, I think that Works for Me.  Almost have this thing ported to Python.07:40
*** rohitksingh_work has joined #timvideos07:46
xobsAnd with that, the debug bridge now works in Python.  Thakns for your help.08:20
xobsActually... how many FPGAs expose xadc_temperature?  Is that just something Bunnie did on NeTV2?08:22
daveshahI've accessed it over JTAG on boards I've built without doing anything special08:22
daveshahNever tried to access it from fabric, but I assume it would also work08:23
daveshahThink all the 7-series parts have the XADC built in08:23
xobsI'm asking because the vexriscv tool I wrote checks that register first (as a kind of test to make sure the network is working), but now that I think about it I don't know that I can rely on its existence.08:24
daveshahYeah, don't think that will work for pre-7-series Xilinx or other vendors08:26
xobsOkay, I'll remove that then.08:27
*** Sigyn has quit IRC08:29
*** Sigyn has joined #timvideos08:29
_florent_xobs: yes that's better removing the  xadc check since this is only valid for 7-series and if xadc core is instanciated09:02
_florent_xobs: but you can add a scrach register to your debug code and check write/read to it09:02
_florent_xobs: or we should add a scratch register to all core, since this is something that can use useful for various things...09:03
xobs_florent_: fair enough.  I removed that check in the latest PR.  And documented the rough steps at
tpbTitle: Debugging · timvideos/litex-buildenv Wiki · GitHub (at
_florent_xobs: ok thanks09:05
_florent_xobs: have you been able to test with the changes i did to use the variant parameter?09:05
xobs_florent_: I'll synthesize a new bitstream now.  I thought Bunnie's version of the litex repo was special, but now that I look the only change of note is the addition of a write_checkpoint().09:12
_florent_ok thanks.09:12
*** harshgugale has joined #timvideos09:22
xobs_florent_: it's working well with the variant parameter.09:24
*** harshgugale has quit IRC09:46
*** rohitksingh_work has quit IRC10:03
xobsActually, I think I may have found an issue with c821a0feab5 that breaks access to reading the DATA register.  I'll make a PR once this test build is done.10:18
*** rohitksingh has joined #timvideos10:44
*** Elwell has joined #timvideos11:35
*** rohitksingh has quit IRC11:43
*** rohitksingh has joined #timvideos11:43
*** sb0 has quit IRC11:49
*** rohitksingh has quit IRC12:05
*** rohitksingh has joined #timvideos12:06
*** rohitksingh has quit IRC12:22
*** sb0 has joined #timvideos12:25
*** Elwell has quit IRC13:23

Generated by 2.13.1 by Marius Gedminas - find it at!