Wednesday, 2020-05-06

*** tpb has joined #litex00:00
benhyeah, lfsr is much faster indeed00:10
benhI'll send a patch00:10
*** HoloIRCUser1 has joined #litex00:33
*** HoloIRCUser2 has joined #litex00:34
*** HoloIRCUser has quit IRC00:38
*** HoloIRCUser1 has quit IRC00:38
*** CarlFK has quit IRC01:05
*** futarisIRCcloud has quit IRC01:13
*** CarlFK has joined #litex01:38
shuffle2would it make sense to use dsp blocks for ip checksum on ecp5? clarity has an "adder_tree" which results in ALU54Bs+MULT18X18Ds..i dont see perf/operation really described anywhere tho02:03
shuffle2alternatively i can just hack it up as most of header is static in my case, but Feels Bad :)02:04
*** Skip has quit IRC02:15
*** Degi has quit IRC03:43
*** Degi has joined #litex03:44
*** CarlFK has quit IRC03:57
*** _whitelogger has quit IRC04:09
*** _whitelogger has joined #litex04:11
*** FFY00 has quit IRC04:30
*** FFY00 has joined #litex04:31
*** HoloIRCUser has joined #litex04:32
*** HoloIRCUser2 has quit IRC04:34
*** awordnot has quit IRC04:41
*** awordnot has joined #litex04:41
*** CarlFK has joined #litex05:35
*** HoloIRCUser1 has joined #litex05:41
*** HoloIRCUser has quit IRC05:45
*** futarisIRCcloud has joined #litex05:45
_florent_scanakci: nice! congrats05:55
_florent_benh: not sure we tried to optimize the memtest speed since it was fast enough with the others CPU, but that could now indeed make sense to have a closer look05:57
*** HoloIRCUser has joined #litex06:35
*** HoloIRCUser1 has quit IRC06:36
benh_florent_: oh I just used the lfsr that Anton wrote for microwatt test suite and it's a lot faster now07:45
benh_florent_: VexRiscV Mini takes a couple of seconds to init the Arty now. It was a lot slower before, maybe 5 to 10s ?07:46
benh_florent_: I'll clean it up and send you the patch tonight (hopefully)07:46
benh_florent_: it's as good a rng as the multiplication method when it comes to generating memory test patterns I reckon07:46
benh_florent_: sent08:23
_florent_benh: thanks!08:24
*** HoloIRCUser1 has joined #litex08:29
*** HoloIRCUser has quit IRC08:31
benh_florent_: for 64-bit CPUs, would it make sense to have a topology with a 64-bit WB going out with 2 slave legs, a 64-bit one to memory and a converted-to-32-bit one for all the IOs ?08:41
benh_florent_: also powerpc64 is really meant to be used on fully cache coherent systems (I could elaborate on the reasons if you want)08:42
benh_florent_: so at some point, we might need to figure out how to implement cache coherent DMA in LiteX :)08:42
benh_florent_: my initial plan was to do something like a snoop-fifo where all addresses go back to the core, and have the core 'sync instruction go out as a special signal that waits for that fifo to drain08:42
benh(well or drain anything prior to that signal being asserted)08:43
_florent_benh: we are currently working on similar things with VexRiscv SMP08:43
benhbut it's just ideas so far08:43
sorearnon-coherence on riscv sounds like a bad time08:43
benhah SMP would require a real cache coherency protocol08:43
benhyeah non-coherence is a mess on CPUs with speculative loads08:43
sorearespecially when there are 0 data cache instructions in your ISA08:44
_florent_VexRiscv SMP has two dedicated instruction/data ports directly connected to the DRAM with a larger data-width (128-bit for now to ease testing)08:44
benhbcs you almost always end up with weird collisions between cachable and non-cachable loads08:44
benhhappens on ARM since v7, powerpc, ...08:44
benhsorear: yeah that doesn't help :-)08:44
benh_florent_: some kind of MERSI protocol ?08:44
_florent_we are also going to work on cache coherent DMA, so most of it could probably be reused by Microwatt later08:45
benhok good08:45
benhthx08:45
benhone thing to avoid btw... I noticed it's somewhat doable currently08:46
benhis have the control reg path to the DMA engine be a separate bus from the data path where DMAs occur08:46
_florent_the implementation still has to be discussed with Charles that is doing the Vexriscv/SMP work08:46
benhit''s a recipe for interesting ordering issues08:46
benhfor example that happened on some IBM Cell that used a sideband bus to control the ethernet DMA engine08:47
benhyou would stop the engine via that (CSR style)08:47
benhbut the writes it did to memory migght still be in various pipeline/bridge buffers and have not reached memory yet08:47
benhhowveer, SW has already freed the memory and given it up to something else, it then gets corrupted by DMA data08:48
benhie, unless the control registers are on the same data path as the DMA, or some other mechanism allows to ensure that the full DMA path to memory has been flushed, that problem will potentially exist08:48
benhon things like PCIe it's typically a non-issue despite fairly large bridge induced latencies because the control path is ordered vs the data path, so for example, reading a DMA status reg will have the read response behind all previous DMA writes to memory08:49
benhby the time the CPU gets it, all the previous DMAs have hit coherency08:49
benhwith control is via some CSR bus that might not be on the same path as the DMA -> memory path, you lose that property08:49
_florent_thanks interesting, we'll have indeed to be careful on these things08:53
benh the best way is to ensure that the control path from the CPU to a device (MMIO) is ordered in some way with the DMA data path from that device to memory08:54
benhyup, it's bitten folks in the past :)08:54
benhwhen adapting esp. old school "simple" design to more recent CPUs, adding bridges etc...08:54
benhfor example powerpc 4xx embedded has a "DCR" bus (a bit like CSRs  but special core instructions)08:55
benhthat's a complete sideband08:55
benhit used that to talk to the DMA engine08:55
benhthat was ok when there was only simple busses and generally, no much buferring08:55
benhbut that whole architecture was then ported to an IO chip for the Cell processor with 3 layers of bridging and pipelining08:55
benhand hell broke lose08:56
benhthe most typical example is probably old school PCI devices (before MSIs)09:02
benha device writes a packet to memory, then sends an interrupt09:02
benhthe interrupt is a wire, so out of band, it often arrives before the DMA data has reached coherency (or a point where it's visible to the CPU)09:02
benhit could be in pipeline buffers on the bus or anything09:03
benhthe CPU gets the interrupt and reads an MMIO register from the device, usually some kind of interrupt status09:03
*** FFY00 has quit IRC09:03
*** FFY00 has joined #litex09:03
benhwhat a lot of folks didn't realize is that the key purposes of that read is not only to know what happened09:04
benhbut to have the response to that read be queued behind all the previous DMAs done by the device so that by the time the CPU gets it09:04
benhit will also "see" all the DMA data09:04
benhnow, apologies if I haven't fully understood the LiteX design, but from what I've seen, it *seems* like your DMA engine has its own port to the memory controller09:04
benhthus is not ordered vs CSRs to device that can trigger dMA09:04
benhas long as there isn't much bufferring/pipelining it's probably fine09:05
benhbut in a world of delays introduced by cache coherency protocols etc... that can quickly fall appart09:05
benhI hope I'm clear :) Otherwise let me know09:05
*** FFY00 has quit IRC09:11
*** FFY00 has joined #litex09:12
shuffle2LiteEthPHYHWReset is just a delay counter. does this exist for some specific reason?09:19
shuffle2oh, nvm09:21
scanakcithanks _florent_ .09:45
scanakciInstead of having a README under cpu/cores/blackparrot (https://github.com/enjoy-digital/litex/tree/master/litex/soc/cores/cpu/blackparrot),  I am planning to have another repo similar to https://github.com/litex-hub/linux-on-litex-vexriscv09:53
tpbTitle: litex/litex/soc/cores/cpu/blackparrot at master · enjoy-digital/litex · GitHub (at github.com)09:53
scanakciDoes that work for you @_florent_?09:53
dkozelxobs: The fixes to the wishbone-tool work, thanks09:54
_florent_scanakci: yes sure, do you still plan to have a version integrated in LiteX?09:54
xobsdkozel: Great! I'll tag wishbone-tool 0.6.17 then09:55
scanakciI think it is better to remove it since any other cores do not.09:55
scanakciHowever, I do not mind having a short README in LiteX repo as well.09:56
dkozelxobs: I have a feature suggestion just before you do that10:00
dkozelI'm almost done typing it up into the issue report10:00
xobsdkozel: Alright.  I added a patch for v0.6.17, but haven't pushed the tag yet.10:01
dkozelhttps://github.com/litex-hub/wishbone-utils/issues/25#issuecomment-62455535510:01
tpbTitle: Add Litepcie bridge support to wishbone-tool · Issue #25 · litex-hub/wishbone-utils · GitHub (at github.com)10:01
dkozelI almost implemented a PR for it, but came up a bit short on idomatically filtering the HashMap10:02
_florent_dkozel: i received the Acorn CLE 215+ this morning, it's working fine :) : https://twitter.com/enjoy_digital/status/125798511146901504010:50
dkozelAwesome!10:50
dkozelMine should arrive tomorrow but I don't have any way of using it until I find an interface that will work outside of the computer10:51
dkozelthe heatsink/fan is too large for my desktop's m.2 slot and I don't have room for another full size PCIe card.10:51
_florent_you also need a specific cable for the JTAG (i soldered it on mine, but will try to find/order a cable)10:52
dkozelThus my interest in the USB 3 PIPE interface or an m.2 thunderbolt enclosure. I've been very confused about the seeming specificity of NVME support in the adapters10:53
dkozelhttps://www.digikey.com/product-detail/en/molex/0369200601/WM26622-ND/1023301810:53
tpbTitle: 0369200601 Molex | Cable Assemblies | DigiKey (at www.digikey.com)10:53
dkozelJTAG10:53
dkozelStill needs some soldering, but has the connector at least10:53
_florent_dkozel: yes that's better than doing the soldering directly on the connector as i did :)10:54
_florent_dkozel: thanks for the reference/link10:54
dkozelNo problem :) Thanks for pointing me towards the board.10:55
_florent_dkozel: the Aller does not have a heatsink on the FPGA?10:55
_florent_dkozel: the FPGA on the Aller is exactly the same as the one on the Acorn, so a similar heatsink could be used10:59
daveshahI guess the thermals are designed for mining rather than general use11:00
dkozelhttps://twitter.com/derekkozel/status/125781542002489344111:03
dkozelI'm having issues with the Aller's heat and heatsinking11:03
dkozelit's idling at 84.9 °C right now with the PCIe etc initialized but idle.11:03
_florent_dkozel: indeed, it's a bit hot, that's probably better to keep the "mining" heatsink then11:06
shuffle2it turns out you dont need mdio to see rgmii phy status: https://gist.github.com/shuffle2/e53d3b24e12bfd2fa418068cd975d8ce is this an OK way to add it (would this be accepted as PR)?11:16
tpbTitle: rgmii_phy_status.diff · GitHub (at gist.github.com)11:16
shuffle2(i wanted to keep some other modules in reset if link is down)11:18
shuffle2is there a way to chain reset of some clock domains from another? when i click reset button i'd like eth_tx/eth_rx to reset as well as sys (it's currently tied to sys via AsyncResetSynchronizer)11:44
shuffle2eh, using ResetSignal('sys') is good enough i guess11:52
*** gregdavill has quit IRC12:12
*** FFY00 has quit IRC13:07
*** FFY00 has joined #litex13:09
_florent_shuffle2: yes sure it would be possible to integrate it, this could be an optional module13:15
dkozelxobs: Works, perfect.13:24
xobsdkozel: Released!  (Or at least pushed the tags.  Give it five minutes or so.)13:25
dkozelThat last commit was a real reshuffle. Thanks for all the time that must have taken.13:25
xobsIt seemed the best way to do it.13:26
xobsAs a result, offsets are computed for everything, including uart and gdb fields.13:26
dkozelgdb I haven't tried yet, but terminal worked.13:28
zypxobs, is «load» in gdb supposed to work?13:31
zypit doesn't seem to be working properly for me, but I haven't looked into why yet, I guess it might not be fully implemented so I figured I'd ask before spending time to only discover that13:33
xobszyp: nope. it's unclear how that would work.13:33
zyphow so?13:33
xobsWell, if your program is XIP, then it would need to know how to program flash.  And I gather most programs are XIP.13:34
xobsI guess if it's entirely in RAM that would work.13:34
xobsBut no, it hasn't been implemented yet.13:34
zypah, yes, flash would require knowledge of the specific flash, I was thinking ram13:36
zypI didn't know litex supported XIP flash, does it?13:37
xobsIt does!13:37
xobsI haven't looked into the new litespi.13:37
xobsBut the original spi core is at https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/spi.py13:37
tpbTitle: litex/spi.py at master · enjoy-digital/litex · GitHub (at github.com)13:37
xobsFomu calls it `lxspi`, and the register set is at https://rm.fomu.im/lxspi.html but it's also memory-mapped13:38
tpbTitle: LXSPI Fomu Bootloader documentation (at rm.fomu.im)13:38
zypI'll have to try that at some point13:38
xobslitespi is at https://github.com/litex-hub/litespi/ and others here may be better able to comment on it.13:40
tpbTitle: GitHub - litex-hub/litespi: Small footprint and configurable SPI core (at github.com)13:40
zypI've written flash programming code for a couple of various microcontrollers for black magic probe some years ago, so maybe I'll have a go at adding that at some point then13:42
zypshouldn't be too hard to find the flash from the csr.csv13:44
xobsYep, you probably can figure out what it is by comparing names.13:44
xobsFor example, if there are three addresses next to each other called  `???_bitbang`, `???_miso`, and `???_bitbang_en`, then that's probably a litex SPI block.13:45
xobsWhat to do when you encounter two blocks that match that is left as an exercise to the implementer :P13:46
zypmap both, obviously13:46
xobsOh, good point.  Obviously.13:46
*** FFY00 has quit IRC13:47
zypbut yeah, one thing I miss in the csr.csv is a «type» field13:47
*** FFY00 has joined #litex13:50
rvensebeen trying again to get my ice40 hx8k evb working with litex, with the stub firmware and an lm32 processor, i get nothing on the serial port, but i do see a slow binary count on the LEDs, does anyone know where that might come from?13:50
xobsrvense: address lines somehow got wired to the LEDs, and it's falling along a nop sled?13:51
rvensedoes it even expose its address bus by default?13:52
xobsNo, but apparently 0xffffffff is `cmpne ba, ba, ba`, which could effectively be a nop.13:54
xobsYou could take a look at `top.v` and trace backwards what you have mapped to the io pins.13:54
rvensegood point13:54
xobsWhile consulting `top.pcf`to make sure they're assigned to what you think they are.13:55
rvenseyeah, i'll look at that later, thanks13:55
*** CarlFK has quit IRC14:00
*** Skip has joined #litex14:01
*** CarlFK has joined #litex14:14
tmbincare there tools that parse VCD/FST and extract for example wishbone transfers, vexrisc PC traces and things like that? I'm running a (bit hacked up) lxsim SoC with an existing RISCV binary (for which I want to build an emulation environment)15:47
tmbinci can manually inspect the --trace and usually figure out why it's crashing (mostly unimplemented peripherals etc.), but is there a more automated way?15:48
disasm[m]Tockilator probably16:42
dkozeltmbinc: Sigrok and GTKWave17:04
dkozelhttps://github.com/im-tomu/valentyusb/tree/master/sim17:06
tpbTitle: valentyusb/sim at master · im-tomu/valentyusb · GitHub (at github.com)17:06
dkozelLooking in here there is at least pieces of the tooling needed17:07
*** HoloIRCUser has joined #litex17:07
*** HoloIRCUser1 has quit IRC17:10
*** darren099 has joined #litex17:24
*** robert2 has joined #litex19:00
*** robert2 is now known as rw1nkler19:00
*** Skip has quit IRC20:03
benh_florent_: I think you broke sdram inits when extending the use of lfsr to other functions21:55
benh-prv = 1664525*prv + 1013904223;21:56
benh+return lfsr(32, seed);21:56
benhs/seed/prv21:56
benhalso in general, it might be worthwhile to document that seed must be non-0, something maybe to add to the comments near lfsr definition21:57
benhfix sent22:09
*** Skip has joined #litex22:27
*** Thierryscv has joined #litex22:50
*** Thierryscv has quit IRC22:51
*** Skip has quit IRC23:05
*** rw1nkler has quit IRC23:13
*** gregdavill has joined #litex23:34

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