Wednesday, 2021-02-03

*** tpb has joined #litex00:00
*** lkcl has quit IRC00:07
*** lkcl has joined #litex00:20
*** Bertl_oO is now known as Bertl_zZ00:23
*** lf has quit IRC00:37
*** lf has joined #litex00:37
*** lkcl has quit IRC01:03
*** lkcl has joined #litex01:17
*** futarisIRCcloud has joined #litex01:40
*** benh has quit IRC01:56
*** benh has joined #litex01:57
*** lkcl has quit IRC02:04
*** lkcl has joined #litex02:18
*** Degi_ has joined #litex03:30
*** Degi has quit IRC03:32
*** Degi_ is now known as Degi03:32
*** awordnot has quit IRC05:24
*** awordnot has joined #litex05:58
*** lkcl has quit IRC06:39
*** kgugala has joined #litex06:41
*** kgugala_ has quit IRC06:44
*** lkcl has joined #litex06:53
*** lkcl has quit IRC07:37
*** lkcl has joined #litex07:50
*** Bertl_zZ is now known as Bertl11:12
somlo_florent_: some additional data on `--read` and `--write` on the nexys4ddr: I rebuilt the bitstream with analyzer and etherbone, and both writes and reads (to the scratch register) work fine; particularly, I can see written values not only from the bios command line, but also read them back with 100% accuracy13:05
somloso it's only when using jtagbone that reading registers is broken for me13:06
somlohaven't tried "classic" uartbone yet, might give that a shot too for completeness13:07
somlo_florent_: console-over-jtag, "classic" uartbone debugging also works fine for reading back register values via litex_client13:34
somlohope that narrows down the list of possible places things are going south... I tried looking through the sources last night, but would need a *lot* more time until things start making sense, and right now is not a good time for me from a $DAYJOB perspective :)13:35
_florent_Thanks for the feedback somlo, I'll also do some tests on the nexys4ddr but I'm not able to spend too much time on it currently (jtagbone is working fine on the setup I'm currently using with Kintex7 + JTAG HS2 cable and I need to go further on other aspects of this project for now).14:08
*** Melkhior has joined #litex15:40
MelkhiorDumb question, is linux-on-litex-vexxriscv expected to work with the latest version of VexRiscV (rather than the specific commit in pythondata-cpu-vexriscv-smp) ? I've updated it to the latest VexRisCV to update my patch for 3-operands & the whole of B, but while I can synthesize/boot/run synthetic test (to check the new instructions one by one),15:45
Melkhiormy longer-running binaries never finish, even if they don't use my new instructions. They don't hang the hardware, they just hog cpu until I control-c them... it was working fine with the detached head that pythondata-cpu-vexriscv-smp originally used, so just wondering...15:45
_florent_Melkhior: I only tested personally with  pythondata-cpu-vexriscv-smp so can't say, but I think pythondata-cpu-vexriscv-smp is based on the dev branch of VexRiscv, is it what you are using?15:50
MelkhiorI'm inside pythondata-cpu-vexriscv-smp, but I've updated the VexRiscV in 'pythondata_cpu_vexriscv_smp/verilog/ext/VexRiscv' to the head of 'master', added my stuff, and used 'generate.py'15:52
MelkhiorThat got me updated verilog in pythondata_cpu_vexriscv_smp, with which I rebuilt the bitstream with 'linux-on-litex-vexriscv' 'make.py'15:53
Melkhiorexcept for that weird 'stuff never seem to finish' behavior, everything else went smoothly...15:54
MelkhiorLast time I was using stuff not up-to-date enough, now I seem to have gone too far the other way:-)  (at first I didn't realize pythondata_cpu_vexriscv_smp was getting VexRiscV in using a specific commit...)15:55
MelkhiorAnyway no big deal, but I'm curious as it's a really weird failure mode.15:56
somloMelkhior: sounds like a job for `git bisect` :)15:56
Melkhior@somlo yes, but it will take a good chunk of forever as synthesizing the bitstream is not fast :-/15:57
MelkhiorFortunately it's the one case where the sd-card work so testing the bitstream is quick :-)15:58
somloyeah, allegedly there's a way to script the test and "good|bad" feedback with git bisect - and one day I'll even gather up all my energy and try it out for myself...15:59
MelkhiorNot sure I'll find the time so no promise :-/15:59
Melkhioryes i've used bisect before - cost me a power supply and an expensive one at that :-)  (lots and lots of power cycle to figure out a bug in LInux on a PowerMac G5 Quad ; a couple boot after I got it figured out, loud 'bang', burnt odor, magic smoke escapes from the very specific 1kW power supply of the G5... grrrr)16:02
somloI've seen that happen too (although on a "vanilla" power supply on a very old pentium I was trying to use for a benchmark)16:03
somloif it's any consolation, the thing was probably on its last legs anyway...16:04
somloprobably an old capacitor16:05
geertuA former co-worker had that happen with one of the old small-refrigerator-sized Silicon Graphics machines, while he was kneeling near it.  Caused him to shake a bit...16:08
geertusomlo: git bisect run /path/to/script16:11
geertuUsually I'm too lazy to write the script (which has to be perfect ;-)16:12
Melkhior@geertu yeah, I jumped in my chair too, must have been a big capa - and then I had to reboot some systems, as it took down the breaker as well...16:23
somlogeertu: yeah, for me it's always been a tradeoff between spending time perfecting the script and just brute-forcing through with manual good/bad feedback16:41
somlobut in bitstream build situations where it takes a few hours to get feedback for each attempt, it might be worth going for the fire-and-forget script-based feature. It also depends on how bisect-able the upstream repo is (how many "broken" commits there are for you to accidentally land on during bisect, where things don't work for reasons unrelated to what you're hunting for16:42
somlogetting to the bottom of all that is a soft bucket-list item of mine, but like you, I'm lazy, so it's going to take a while16:43
nickoemmm, daveshah, I am not sure what requests that cpu reset signal, but I just added it on an unused pin. Now it starts to run vivado with make gateware, but it seems like it is not overly happy with some pin constraints.17:00
nickoelike "CRITICAL WARNING: [Common 17-69] Command failed: 'U13' is not a valid site or package pin name. [/.../litex-buildenv/build/mars_ax3_base_vexriscv/gateware/mars_ax3.xdc:5]"17:02
nickoehttps://dpaste.com/D8NYZNLLM17:03
tpbTitle: dpaste: D8NYZNLLM (at dpaste.com)17:03
daveshahnickoe: are you using U13 in your platform file for something?17:08
nickoeyes, uart tx17:09
*** kgugala_ has joined #litex17:09
daveshahis that the correct pin?17:10
nickoebut I guess I could hack that around if needed, I think it was just added to a random pin without having any idea about the gpio banks.17:10
nickoedaveshah: Yeah, I just checked with the pcb design.17:10
daveshahThen the package is probably set up wrong17:11
nickoemm, not the package, the pcb design -- right?17:11
nickoedaveshah: there are lots ofother pins with that warning, see https://dpaste.com/D8NYZNLLM#line-141517:12
tpbTitle: dpaste: D8NYZNLLM (at dpaste.com)17:12
*** kgugala has quit IRC17:13
daveshahyou sure it is the cpg236 package?17:13
nickoehm, no it is not17:15
nickoeit is xc7a35tcsg324-117:16
daveshahthen you'll need to change that in the platform file17:17
nickoeyeah, I just did,  XilinxPlatform.__init__(self, "xc7a35t-csg324-1", _io,  toolchain=toolchain)17:17
nickoethe user manual for the module suggests this, https://dpaste.com/9JWMZD7UY17:18
tpbTitle: dpaste: 9JWMZD7UY (at dpaste.com)17:18
nickoeso I guess I need to set that pin to low17:18
nickoehow do I do that in the platform code?17:18
daveshahif you look at the top of the log file, vivado is trying to build for the xc7a35t-cpg236-1 device17:18
daveshahyou'll need to sort that first17:18
*** kgugala_ has quit IRC17:19
daveshahsetting a pin to a constant can be done in the target17:19
daveshahhttps://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/trellisboard.py#L11017:19
*** kgugala has joined #litex17:19
nickoeupated build log https://dpaste.com/A59KBJRXB17:19
daveshahis an example of setting a pin to 1, setting a pin to 0 is much the same17:19
tpbTitle: dpaste: A59KBJRXB (at dpaste.com)17:19
nickoe(now using the correct package)17:19
daveshahI'm not sure why that error is happening, possibly one of the address pins is wrong17:20
daveshahthat might be one for _florent_17:20
_florent_nickoe: that's probably a missing INTERNAL_VREF constraints on the DRAM bank, ex: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/platforms/arty.py#L32617:23
nickoeI used this as a base for my base (pun intended), by the way, https://github.com/timvideos/litex-buildenv/blob/master/targets/arty/base.py17:25
nickoeand this for the platforms https://github.com/timvideos/litex-buildenv/blob/master/platforms/arty.py17:28
nickoeso I have         self.add_platform_command("set_property INTERNAL_VREF 0.750 [get_iobanks 34]")17:28
nickoemy ddr3 sdram is on bank 1517:30
nickoeand if I use low voltage ram, I guess I need to set it to 1.35/2?17:32
nickoeSo "set_property INTERNAL_VREF 0.675 [get_iobanks 15] ?17:32
_florent_nickoe: yes exactly17:34
nickoemm, now I changed something .. I am not sure about.. https://dpaste.com/6SZN4XMBC17:35
tpbTitle: dpaste: 6SZN4XMBC (at dpaste.com)17:35
mithro_florent_: Regarding https://github.com/litex-hub/pythondata-auto/pull/7 -- eine / umarco is the expert on GitHub Actions17:36
nickoepushed my changes here for reference, https://github.com/nickoe/litex-buildenv/commit/f46ff5aa9515696bcee0134021a9ed81a2e6602917:43
MelkhiorI think I found my problem, it seems the timing functions in the code are broken. I expected the cycle counter (rdycle/rdcycleh) to be the culprit, but no, it's actually getttimeofday() !17:44
MelkhiorFor some reason, this:17:44
Melkhiorstatic long long microseconds(void)17:44
Melkhior{17:44
Melkhior  struct timeval t;17:44
Melkhior  gettimeofday(&t,(struct timezone *) 0);17:44
Melkhior  return t.tv_sec * (long long) 1000000 + t.tv_usec;17:44
Melkhior}17:44
MelkhiorReturns a constant value, so the difference between call is always 0 and the calibrating goes into an infinite loop...17:44
MelkhiorNow to figure out why gettimeofday() behave like that, and whether it's a hardware or software problem...17:44
Melkhiorto be continued :-)17:46
_florent_mithro: I think the remaining issue is only a permission issue (for the bot to push changes on the repositories): https://github.com/litex-hub/pythondata-auto/runs/1824573452?check_suite_focus=true17:46
*** Melkhior has quit IRC17:51
nickoedaveshah: is it a valid place to put this signal? https://github.com/timvideos/litex-buildenv/commit/e113369880fb636549088a45cbdbafac78debfb517:52
nickoemm, no, I guess it should just be a "signal" or something?17:53
nickoemm17:54
nickoeok, like this I guess https://github.com/litex-hub/litex-boards/blob/master/litex_boards/platforms/trellisboard.py#L6617:54
somloMelkhior: a total shot in the dark, but any chance it's related to either timebase-frequency or clock-frequency in the DTS? :)17:54
somloprobably not, but since we were on that topic a few days ago...17:54
*** Bertl is now known as Bertl_oO17:59
mithro_florent_: BTW We will be moving the conda packages from litex-hub organization to the hdl organization as they are now being used in a couple of contexts, not just with litex18:02
nickoehmm, why do I get this error https://dpaste.com/9RPM8ZMWQ  from this change trying to add LEDChaser? https://github.com/timvideos/litex-buildenv/commit/ae98c83277eabe7e48acc455138f094b1b4d748c18:02
tpbTitle: dpaste: 9RPM8ZMWQ (at dpaste.com)18:02
nickoeI have four user_led's defined in the platform.18:02
*** Melkhior has joined #litex18:06
Melkhior@somlo I don't think so, gettimeofday() actually fails (once tested...) and errno is 38, "Invalid system call number", so I lean toward a configuration issue in the kernel/buildroot...18:08
Melkhiorseems that whatever real-time mechanism is backing gettimeofday() is MIA ...18:08
daveshahthis has strong "64 bit time_t" vibes but I can't point to a specific problem18:10
Melkhiorperhaps18:11
Melkhiorbut this is the 'latest' buidlroot with Geert's v5.11 kernel, so both should be quite up-to-date and compatible...18:12
Melkhiormaybe a configuration issue ?18:12
Melkhiorcould have messed that up when I upgraded buildroot/kernel...18:12
Melkhioranyway I'll try to track & report18:13
Melkhiorthanks for the suggestions18:13
geertuMelkhior: does "sleep 1" in a shell return after 1s?18:13
nickoeOMG OMG OMG daveshah it booted to the litex bios, I can see that via serial. Soo, how can I test the flash and ram?18:19
daveshahThe ram test should be automatic on boot if your target is supported properly18:19
daveshah*set up properly18:20
daveshahThe flash I'm not so sure about as I've not used flash with litex before18:20
Melkhior@geeru yes it seems to work properly18:20
nickoeit completed a "fe" with "Flash erased"18:21
Melkhior@geertu sorry18:22
nickoeoh, there a sdrinit command18:22
Melkhior@geertu the 'sleep' is from busybox, dunno if it changes the implementation18:22
nickoedaveshah: I am not sure if the pattern seen in the middle for that read levelling is good or not, but https://i.snipboard.io/d1fOT2.jpg18:51
nickoeis there a way to generate a memory map over stuff i a litex soc easily?18:56
_florent_nickoe: the memtest is passing it seems, congrats :)19:01
nickoeI have no idea how much that tests, but I guess it is a good starting point.19:02
nickoehow can I test flash?19:02
_florent_if the spiflash is integrated, you can do mem_list to get the base address of the flash and then do a mem_read to verify the content19:03
nickoe_florent_: I am not sure if this is good? https://dpaste.com/8PJH9DKRD19:03
tpbTitle: dpaste: 8PJH9DKRD (at dpaste.com)19:03
_florent_sorry I have to go19:03
nickoeok19:04
nickoeI only have these commands, https://dpaste.com/CA997LUBA19:04
tpbTitle: dpaste: CA997LUBA (at dpaste.com)19:04
_florent_memtest is already testing the main_ram19:04
_florent_ah, you are using an old version of LiteX19:04
_florent_I would recommend using upstream19:05
nickoeold?! I used https://github.com/timvideos/litex-buildenv19:06
mithroLitex-BuildEnv lags behind the current upstream version19:15
nickoemithro: How much?19:17
nickoeAre there any docs about how to actually do firmware for it? I would like to try to just get a register that I can write a byte in and it will be reflected on some io pins.19:17
mithronickoe: dunno at the moment, the Travis CI breakage hasn't been fixed19:18
nickoemm, ok, but in the meantime, do you see anythin wrong with this change? https://github.com/timvideos/litex-buildenv/commit/ae98c83277eabe7e48acc455138f094b1b4d748c19:19
nickoeI mean expect for the comment that says this is static.. I can't compile that and get https://dpaste.com/9RPM8ZMWQ19:20
tpbTitle: dpaste: 9RPM8ZMWQ (at dpaste.com)19:20
nickoemaybe I did something wrong with? https://github.com/nickoe/litex-buildenv/blob/mars_ax3/platforms/mars_ax3.py#L9-L1219:21
mithroLook at the code in home/nickoe/litex_test/litex-buildenv/third_party/litex/litex/build/generic_platform.py around the ValueError19:22
nickoeit do seem to hit the value error at 22419:26
nickoein  def request_all(self, name):19:26
nickoeI still don't get why it fails. The code looks the same to the upstream litex as well.19:30
ius_florent_: have you seen any segfaults on linux/vexriscv-smp with n>1 cores? if i build acorn with 1 core everything is fine, if i build with 4 userspace executables crash quite often ( https://p.6core.net/p/uVYThfx2kr1AKdBpYHC5YiUN )19:49
iusfact that i have never seen the kernel itself crash makes me wonder whether its perhaps /not/ a hardware bug, but instead some smp-related issue in the kernel?19:50
*** Melkhior has quit IRC20:16
_florent_ius: that's indeed possibly related to the updated kernel. I tested various configurations with a 5.10 kernel and haven't seen this crash, but not sure I tested n>1 with the 5.11 kernel.20:48
iusguess i could try an older kernel20:49
iusi was actually trying to debug something else: i tried to add a second serial port, but that doesn't seem to work either20:50
iusadded the port to SoC, device tree, modifed kernel config (for some reason liteuart has a Kconfig-configurable limit) - device appears in /dev but it appears to be dead for rx/tx (if i poke the register with devmem2 it works, though)20:54
_florent_ius: this could be an issue in the driver, not sure we tested multiple instances of the same peripherals20:57
iusyes, i figured, so thats why im trying to get jtag working20:58
*** dkozel has quit IRC21:02
*** dkozel has joined #litex21:04
nickoe_florent_: Why can't I do         self.comb += platform.request("user_led", 2).eq(1) ?23:02
nickoeI have four leds specified in the platform23:02
nickoemithro: mm, maybe this old issue should just be closed? https://github.com/timvideos/litex-buildenv/issues/7123:27
nickoehmm, if I rename the leds in the platform code away from "user_led" then it works :O  Why is this?23:36
nickoeI guess the only reason is that the platform object is not quite the right one or something.23:53

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!