Friday, 2022-05-27

*** tpb <[email protected]> has joined #litex00:00
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has joined #litex00:32
*** Hammdist <[email protected]> has joined #litex00:53
Hammdistanyone know how to instantiate just the litex uart so I can include that as a module in my design? I don't want to generate a full SoC, but just the uart01:23
*** Degi_ <[email protected]> has joined #litex03:32
*** Degi <[email protected]> has quit IRC (Ping timeout: 240 seconds)03:33
*** Degi_ is now known as Degi03:33
_florent_zyp: that would be great!05:10
_florent_Otherwise, I'm trying to allocate some time to write doc, that's still parse but should improve progressively.05:11
_florent_By collecting the different supports questions/answers (emails/github issues),  it should already be possible to improve the doc without too much efforts. Then I should probably really block like some time in my agenda to write doc (sadly there are generally always other priorities...)05:16
*** indy <[email protected]> has quit IRC (Quit: ZNC 1.8.2 - https://znc.in)05:16
*** indy <[email protected]> has joined #litex05:16
swetlandI'm happy to do some review/feedback on doc stuff if that's useful (also I'll try to take some notes as I decipher things that maybe could turn into docs)05:27
_florent_swetland: review/feedback is always useful yes (being familiar with the project, I no longer see some gaps in doc, etc...). Some notes of the difficulties you can have when adapting the code would also be useful (to know where to put the focus on for the doc). 05:40
_florent_mithro: thanks for the litex-hub profile page!05:40
_florent_Hammdist: not exactly what you are looking for, but an example of JTAG-UART standalone core from LiteX components:05:47
_florent_https://gist.github.com/enjoy-digital/0008ba45b1d517cebe2f4dbdb02753b005:47
_florent_replacing the JTAGPHY with a UARTPHY could do what you want05:48
_florent_Hammdist: or this: https://libera.irclog.whitequark.org/litex/2022-04-06#32048447;05:50
tpbTitle: #litex on 2022-04-06 — irc logs at libera.irclog.whitequark.org (at libera.irclog.whitequark.org)05:50
swetlandhttps://gist.github.com/swetland/1c6b0952647adf7565a8a81ad384d32c06:07
swetlandsome notes (maybe not correct!) on adding a second ethphy+ethmac to a board06:07
swetlandI am still finding that depending on where I place the ethernet pmod I may or may not need the clock skew trick.  Seems like a combination of gateware layout, baseboard trace lengths, and pmod trace lengths interacting, perhaps.  I haven't fired up the fast scope to try to take pictures yet06:09
_florent_swetland: thanks06:14
swetlandthis is one of those things where it'd be cool if the framework were a little more automatic (like it had the concept of peripheral instances so adding a second or third timer or gpio bank or whatever were a little more plug-and-play), but if not or until that, having some recipes/examples for how to do that might save folks time06:41
*** FabM <FabM!~FabM@2a03:d604:103:600:5b01:4689:6179:885> has joined #litex07:27
_florent_Playing a bit more with CoreScore, now 10 000 SERV CPUs on the VU19P: https://twitter.com/enjoy_digital/status/153008541760895795208:05
_florent_the chip can do more since "only" 54% of the CLBs are used, but Vivado was crashing with 12 000 cores and 64GB of RAM, I would need to switch to 128GB (and switch to 32GB sticks) but not sure I have real need for this...08:08
swetlandI am hoping that the next time I do work on xilinx parts I will be able to skip the Vivado experience...08:12
swetlandThough last I checked all my makefiles and tcl scripts I use to drive their nonsense without using the UI still worked.  So at least there's that.08:13
_florent_swetland: When used in batch mode, I don't really have to complain that much about Vivado. It's sure slower than open-source toolchains on small designs but it scales well on large designs and once you are familiar with it you generally don't have that much surprises.08:19
_florent_But the UI/BlockDesign/IP migration between versions is another thing yes... that I try to avoid 08:20
swetlandyeah their IP block stuff is pretty amazingly awful08:27
swetlandIt sounded neat when I first saw it, but it is so incredibly convoluted and ugly under the hood that it just is not worth dealing with08:28
swetlandto the point where I ended up writing scripts to generate wrappers around the PS7's like 700 nets ^^08:29
swetland(was doing MIPI2 CSI frontend stuff for machine vision on Zynq at the time. learned a lot about AXI 3 and 4)08:29
leonsIt's all nice when your system locale is set to English, but otherwise you're in for a treat08:30
swetlandI can't even imagine08:30
leonsTheir weird tcl / java wizards generating XMLs with dots as decimal separators, but the actual synthesis engine expecting commas, etc...08:31
swetlandoh no08:31
swetlandI look at the house of cards of these vendor tools and you can see the eras of technology stack up... 08:31
swetlandlike back in the day TCL was basically *the* scripting/automation language and everyone adopted it08:32
swetlandand then in the early 2000s people started trying to overhaul their GUIs and got sold on Java and XML08:32
swetlandbut of course kept all the TCL for compatibility08:32
swetlandand bolted in piles of native shared libs for performance08:33
leonsI have already developed somewhat of a Stockholm syndrome when it comes to Vivado :) At least with that toolchain I have a rough idea where to punch it to get it to work ^^08:33
swetlandI'm sorta fearing a next generation where they keep ALL OF THAT and then wrap a new UI built on Electron/JS or Flutter/Dart on top of it, and bridge between JSON, XML, and TCL08:33
swetlandwhat I'm *hoping* for is we'll eventually see the foss software stacks win out like they did in the C/C++ compiler arena08:34
leonsFor instance, just recently the gtwizard magically took care of automatic rerouting of a refclk input for me, but then set the clock selection to complete garbage. For these bugs their device view to look at the actual implemented design is actually quite nice :)08:35
swetlandand have the vendors finally give up on trying to make the core toolchain the "value add"08:35
swetlandoh I do like the visualization tools08:35
leonsSure, if they would have working wizards all of this wouldn't be needed, but eh08:35
swetlandIt's a lot easier to look at what vivado turned your verilog into than yosys/nextpnr08:36
leonsAssuming it doesn't segfault, that is :)08:36
swetlandwell, vendor tools. if they worked all the time where would the adventure be?08:36
leonstrue08:37
swetlandI wasted a day and a half doing bringup on a mcu/radio because the vendor only gives access to the radio via a blackbox library and you need to use their IDE/Wizard to configure it and generate a big 'ol slam table the radio_init() ingests08:37
swetlandand I realized that I had started using their out of date IDE, so installed the new multi-GB monstrosity, and then everything went to shit08:38
swetlanduntil I figured out that the importer for the radio config changed the part family (which is NOT VISIBLE ANYWHERE in the CONFIG UI) so it was generating a slam table for the wrong part08:38
leonsuh, just realized the latest Vivado is an >70GB download. Not fit for German broadband...08:40
swetlandswetland@dontpanic:~$ du -ks /work/app/* | sort -n08:46
swetland34052   /work/app/yosys08:46
swetland81552   /work/app/prjtrellis08:46
swetland99776   /work/app/verilator08:46
swetland112504  /work/app/icestorm08:46
swetland530320  /work/app/nextpnr08:46
swetlandnot quite 3/4 GB!08:46
swetlandor just over maybe (math is hard when I'm half alseep)08:47
leonssmaller than Vivado for sure, not that that'd be hard to accomplish I suppose08:48
*** Abhishek_ <[email protected]> has joined #litex12:45
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Ping timeout: 258 seconds)15:43
mithroswetland: -H :-)18:08
jevinskie[m]Bah, I think I’m going to go down another rabbit hole and try to implement RLE for litescope - it would really be nice to get a dozen seconds worth of USB UTMI data instead of sub milliseconds :) anybody else need this and want to help? :) https://github.com/enjoy-digital/litescope/issues/718:11
jevinskie[m]Ah I have to go back to 2016 to find the original source https://github.com/enjoy-digital/litescope/blob/e211d17ca620c2c982a5a21996b577dbf04a2701/litescope/core/storage.py#L4318:17
HammdistVexRiscv generated by GenSmallestNoCsr seems to get stuck on an `sb` instruction. did I do something wrong or is it possible the core is so minimal it only supports word-sized memory access?20:17
Hammdistactually it gets stuck on the preceding `li` instruction .. now I'm stumped20:32
swetlandwhat does that exactly disassemble to (is it maybe a constant load through a global register that's uninitialized?)20:35
somloHammdist, swetland: per google ("li riscv instruction") I found https://github.com/riscv-non-isa/riscv-asm-manual/blob/master/riscv-asm.md#load-immediate20:40
somloI'll go ahead and bookmark that for myself, should come in handy in the future :)20:40
somlobut `li` is an alias for a `lui` + `addi`, and does *not* touch any other register but the intended load target20:41
swetlandit was my understanding that the assembler treats li as a pseudo op for "most efficient way to get the constant into the register"20:41
swetlandso for small constants it could be just an addi target, x0, imm   etc etc20:42
somlowhich happens to be `lui` followed by `addi` if needed20:42
swetlandper the RISCV Unprivileged ISA, li is an alias for "myriad sequences".  I do agree that lui+addi or just addi seem most likely.20:44
somlotrue, one can do an immediate load just by adding x0 to something... guess the only way to tell is to disassemble whatever is running (e.g. with objdump)20:44
swetlandmy instinct on "core is hanging on instruction at <addr>" is "check exactly what instruction that is"20:45
Hammdist24:        04200693                  li        a3,6621:20
Hammdistperhaps I didn't build a correct toolchain21:25
swetland that's addi a3, zero, 66... so certainly seems like the cpu should be plenty happy with it21:25
swetlandnah, objdump helpfully disassembles addi target, zero, imm  as a li to make it more human friendly21:25
Hammdisthttps://paste.ee/p/oHdpL21:26
tpbTitle: Paste.ee - View paste oHdpL (at paste.ee)21:26
Hammdistnotice how the last time iBus_cmd_valid is high is for fetching pc 0x2421:27
Hammdistmaybe the dBus didn't acknowledge correctly21:28
swetland00d701a3                sb      a3,3(a4)21:29
Hammdistthat too but it's never actually requested by the cpu21:33
* swetland nods21:34
Hammdistindeed 04200693 somehow causes a dBus command that doesn't get acknowledged. I'm not clear on why it's causing a dBus command even but probably more digging will reveal the reason21:37
Hammdistah it's from an instruction earlier in the pipeline21:45
Hammdisthttps://paste.ee/p/J9G7A ... don't understand why it's generating such complex code ... and why there is a load of the TXREG21:53
tpbTitle: Paste.ee - View paste J9G7A (at paste.ee)21:53

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