Wednesday, 2021-10-20

*** tpb <[email protected]> has joined #litex00:00
DerekKozel[m]The GNU Radio blocks are achieving 7.22 Gbps throughput over Thunderbolt, same as the litepcie_util dma_test. Might improve that when this moves read/write to separate threads this weekend.00:11
DerekKozel[m]_florent_: You suggested changing the pcie DMA buffering_depth to 8k last time we talked about throughput. What do you think about adding that parameter to add_pcie()?00:13
DerekKozel[m]https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L172000:13
DerekKozel[m]If thumbs up I can do that PR00:13
*** Degi_ <[email protected]> has joined #litex02:35
*** Degi <[email protected]> has quit IRC (Ping timeout: 260 seconds)02:36
*** Degi_ is now known as Degi02:36
cr1901_florent_: When you get the chance, could you run " python3 -m litex_boards.targets.1bitsquared_icebreaker --cpu-type=serv --build --flash" and report back w/ whether the SoC runs? I cannot get a working firmware, but the gateware seems fine04:20
cr1901readelf -A build/1bitsquared_icebreaker/software/bios/bios.elf04:20
cr1901Tag_RISCV_arch: "rv32i2p0"04:20
cr1901This looks fine too04:21
cr1901I can duplicated the SoC not working on both Linux and Windows. So I don't think it's a cosmic ray event04:21
mc6808_florent_: I just bisected liteeth: 2b23788 works and 43a2ea8 fails with litescope -v ... . https://github.com/enjoy-digital/liteeth/commit/43a2ea811819c4fa07e9b5db996a58ae8bc5db5d05:54
mc6808_florent_: I guess this is marginal timing with gigE on ECP5? 05:57
mc6808Warning: Max frequency for clock               '$glbnet$etherbone_clk': 68.07 MHz (FAIL at 75.01 MHz)05:57
mc6808Warning: Max frequency for clock '$glbnet$eth_clocks_rx$TRELLIS_IO_IN': 110.47 MHz (FAIL at 125.00 MHz)05:57
mc6808Info: Max frequency for clock                    '$glbnet$init_clk': 362.32 MHz (PASS at 25.00 MHz)05:57
mc6808Info: Max frequency for clock        '$glbnet$clk100$TRELLIS_IO_IN': 410.00 MHz (PASS at 100.00 MHz)05:57
mc6808Info: Max delay <async>                                     -> <async>                                    : 0.15 ns05:57
mc6808Info: Max delay <async>                                     -> posedge $glbnet$etherbone_clk              : 3.79 ns05:57
mc6808Info: Max delay <async>                                     -> posedge $glbnet$init_clk                   : 3.20 ns05:57
mc6808Info: Max delay posedge $glbnet$clk100$TRELLIS_IO_IN        -> posedge $glbnet$etherbone_clk              : 4.29 ns05:57
mc6808Info: Max delay posedge $glbnet$clk100$TRELLIS_IO_IN        -> posedge $glbnet$init_clk                   : 3.69 ns05:57
mc6808Info: Max delay posedge $glbnet$eth_clocks_rx$TRELLIS_IO_IN -> <async>                                    : 6.97 ns05:57
mc6808Info: Max delay posedge $glbnet$eth_clocks_rx$TRELLIS_IO_IN -> posedge $glbnet$etherbone_clk              : 1.29 ns05:57
mc6808Info: Max delay posedge $glbnet$etherbone_clk               -> <async>                                    : 10.61 ns05:57
mc6808Info: Max delay posedge $glbnet$etherbone_clk               -> posedge $glbnet$eth_clocks_rx$TRELLIS_IO_IN: 2.94 ns05:57
mc6808Info: Max delay posedge $glbnet$etherbone_clk               -> posedge $glbnet$init_clk                   : 2.33 ns05:57
mc6808Info: Max delay posedge $glbnet$init_clk                    -> <async>                                    : 3.28 ns05:57
mc6808Info: Max delay posedge $glbnet$init_clk                    -> posedge $glbnet$etherbone_clk              : 1.68 ns05:57
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)05:58
*** TMM_ <[email protected]> has joined #litex05:58
*** Guest78 <[email protected]> has quit IRC (Quit: Client closed)06:39
*** tnt_ <tnt_!~tnt@osmocom/tnt> has joined #litex07:00
*** shenki_ <[email protected]> has joined #litex07:00
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has quit IRC (Remote host closed the connection)07:01
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has joined #litex07:02
*** vomoniyi[m] <vomoniyi[m]!~vomoniyig@2001:470:69fc:105::3023> has quit IRC (Ping timeout: 260 seconds)07:09
*** tnt <tnt!~tnt@osmocom/tnt> has quit IRC (Ping timeout: 260 seconds)07:09
*** shenki <[email protected]> has quit IRC (Ping timeout: 260 seconds)07:09
*** willcode4[m] <willcode4[m]!~willcode4@2001:470:69fc:105::e1b3> has quit IRC (Ping timeout: 260 seconds)07:09
*** vomoniyi[m] <vomoniyi[m]!~vomoniyig@2001:470:69fc:105::3023> has joined #litex07:13
*** willcode4[m] <willcode4[m]!~willcode4@2001:470:69fc:105::e1b3> has joined #litex07:16
_florent_DerekKozel[m]: We should indeed expose more parameters to add_pcie, happy to review/merge the PR if you look at it.07:41
*** tnt_ is now known as tnt07:42
_florent_cr1901: It's working here yes, here is the fpga bitstream + bios if you want to check your hardware with it: https://github.com/litex-hub/litex-boards/files/7379097/1bitsquared_icebreaker_fpga%2Bbios_2021_10_20.zip07:42
_florent_mc6808: Thanks for looking at it, I opened https://github.com/enjoy-digital/liteeth/issues/86 for this, I'll look at this and will do tests on ECP5 and others FPGAs to see if it's ECP5 specific.07:45
_florent_mntmn: For the framebuffer/color issue, you could eventually use the colorbars pattern to investigate more easily by replacing the framebuffer with something like this: https://github.com/litex-hub/litex-boards/blob/5190c9c869ad61c9940a8b8a766b6808382e934c/litex_boards/targets/sipeed_tang_nano_4k.py#L114-L11507:48
*** ewen <[email protected]> has joined #litex08:15
_florent_DerekKozel[m], ilia__s: The OpenOCD modification discussed yesterday has been pushed to https://github.com/enjoy-digital/openocd08:32
*** C-Man <[email protected]> has quit IRC (Ping timeout: 265 seconds)08:32
_florent_I also created https://github.com/enjoy-digital/litex/wiki/FPGA-and-SPI-Flash-programmers to clarify installation of programmers08:32
ilia__s_florent_: why should not this patch be contributed to openocd master?08:33
DerekKozel[m]Thanks florent08:34
DerekKozel[m]I really appreciate your time here. I'm collecting general notes and will find places for them in the wiki.08:36
DerekKozel[m]Do you have any ICAP references or snippets for host to FPGA loading? I found the antmicro code and examples for loading from the softcore.08:39
_florent_ilia__s: This would be done yes, I haven't spent the time yet to understand the OpenOCD upstream process, this was just the path of least resistance...08:45
_florent_DerekKozel[m]: I haven't used ICAP for this yet but plan to do so soon, I was also going to look at antmicro's code08:47
DerekKozel[m]Ok. not a priority, just a nice to have08:47
*** ewen <[email protected]> has quit IRC (Ping timeout: 260 seconds)09:23
*** futarisIRCcloud <[email protected]> has joined #litex09:25
futarisIRCcloudhttps://twitter.com/UlfFrisk/status/145075207655275725109:26
_florent_futarisIRCcloud: Thanks for sharing, that's interesting. Since the Acorn has 4 GTP lanes and only one is used by PCIeLeech, it would also be possible to use one of the other lanes for the communication with the Host, like USB3.09:49
_florent_This would be a nice usecase of the https://github.com/enjoy-digital/usb3_pipe or Luna, but there is still a bit of work to do to have something usable09:50
*** C-Man <[email protected]> has joined #litex09:53
cr1901_florent_: Thank you for the code... your code does not work either. Hmmm, I have a theory... what revision icebreaker do you have?10:20
cr1901Mine is v1.0b10:21
_florent_v1.0e10:22
cr1901I wonder if the SPI flash is different between v1.0b and e10:22
cr1901and that they need different parameters10:22
cr1901cc: esden is this possible?10:23
tntyes10:25
cr1901I can't find a schematic of "e" to confirm10:26
tnthttps://github.com/YosysHQ/icestorm/pull/283/commits/6a554eb70fd71459165c9bc1c9939c98a651995d10:26
cr1901>if you used the wrong flash chip10:28
cr1901Can you elaborate? :P10:28
tntThere is a bunch of different variants of the windbond 25q128 depending on the letters after the part number.10:29
tntAfter power up, some have QE=1, some have QE=0.  The litex spi flash thing doesn't do any init and so doesn't write the flash mode register to properly set it, it assumes it's all ready. Which depending on the defaults, it might not be.10:30
cr1901Shit, I'd rather just have 1-bit width mode than go through this10:31
cr1901tnt: Thank you for your patch of course :)10:31
tntI'm assuming your part number ends in 'IM' on the flash ? and not 'IQ' ?10:32
* cr1901 gets a flashlight10:32
tnt2-bit width mode should work too without that bit set. (assuming the litex core suports that).10:32
tntYou could also add support for init sequence to the litex core :D10:33
cr190125q128jvsm10:33
tntYup.10:33
tntNote that I think the description of the patch is incorrect. There is a non-volatile version of that bit that's apparently OTP writable.10:34
cr1901>You could also add support for init sequence to the litex core :D10:35
cr1901That would be more ideal I think10:35
cr1901with that being said, I just wanted something that works b/c it's been a while since I've followed litex10:35
cr1901I had this problem w/ TinyFPGA Bx/B2 a long time ago... I hardcoded the wrong SPI flash parameters and I didn't understand the problem until Luke pointed it out. Months later.10:40
mntmnif i use platform.add_verilog_include_path and platform.add_source_dir in a target, do i have to anything else with those files to get them to be picked up during a linux-on-litex-vexriscv build?11:02
mntmnah i see that the include paths are expected to be relative to linux-on-litex-vexriscv11:03
mntmnnot the target...11:03
cr1901gatecat: If I get an error like "ERROR: Bel 'X23/Y0/io0' of type 'SB_IO' is not valid for cell 'SB_IO_1' of type 'SB_IO'11:03
cr19010 warnings, 1 error", is there a verbose mode that'll tell me why without recompiling to enable the debug output?11:03
cr1901Nothing looks odd to me viewing it in the GUI, but I'm not very familiar w/ ice40 internals11:04
mntmnyeah, that made it work11:04
gatecatcr1901: there's no debug at all for validity checking failures atm :/11:06
gatecatit's probably to do with which IO tiles share a clock between two pins11:06
cr1901Ahhh hmmm. Guess I'm not getting around looking into this deeply lol11:08
tntCheck what's at X23/Y0/io111:08
cr1901It's an I/O port11:09
tntyeah ... the `io1` was a big clue.11:09
tntI meant what you connected there.11:09
cr1901Oh, I already blew away those files... hang on...11:09
tntup5k ?11:09
cr1901yes11:09
tntSo that's miso and mosi11:10
tntweird, I'd expect those to have compatible IO registers.11:10
cr1901I changed "self.add_spi_flash(mode="1x", module=W25Q128JV(Codes.READ_1_1_4), with_master=False)" to11:10
cr1901"self.add_spi_flash(mode="1x", module=W25Q128JV(Codes.READ_1_1_1), with_master=False)" just to see what would happen11:11
tntNot sure what's that supposed to do TBH.11:11
tntBut I'd be interested to see the generated verilog.11:11
cr1901http://gopher.wdj-consulting.com:70/store/_1bitsquared_icebreaker.v11:13
cr1901http://gopher.wdj-consulting.com:70/store/_1bitsquared_icebreaker.json11:13
cr1901line 9789 for the offending I/O connection in json11:14
cr1901tnt: Btw, how'd you know it was MOSI/MISO so fast w/o a JSON? :o11:14
tntAh yeah ... it's an invalid clock config technically.11:15
tntBecause from the IO site I could get the pad number for the up5k and those were the flash is.11:15
cr1901ahhh, fair11:16
tntSo technicaly SB_IO_1 is configured for registerd input. That's what the "PIN_MODE" sets it to.11:16
tntEven though the input path is not actually used.11:16
tntBut if it's configured for registered input, then the INPUT_CLK must match ... and here obviously it doesn't since INPUT_CLK is not connected.11:17
tntif input isn't used, pin_type should be set to unregistered input mode.11:18
cr1901the INPUT_CLK must match _what_?11:18
cr1901Just... being connected is a "match"?11:18
tntmust match what's in the other SB_IO that's in the same IO tile.11:19
tntwhich is SB_IO_2 here.11:19
tntThere are two SB_IO per IO tile. And they must share clock_enable / input_clk / output_clk.11:20
cr1901Ahhh okay, and in this case11:20
cr1901INPUT_CLK is used on one, OUTPUT_CLK is used on the other11:20
tntyes.11:20
cr1901but not both11:20
cr1901And a way around this is to set the PIN_TYPE on one of the I/O pins to shut up the validity checker?11:21
tntAnd nextpnr looks at the PIN_TYPE to know if the register is used at all.11:21
cr1901set the PIN_TYPE appropriately*11:21
tntif it's not used, then it will ignore mismatched clock connection and just use the clock of the one that's effectively enabled.11:21
tntyes, setting pin_type to 21 should do it.11:22
cr1901>just use the clock of the one that's effectively enabled.11:23
cr1901"effectively" enabled?11:23
cr1901Anyways I get it now11:23
cr1901LiteX generates the SB_IOs, so I have to look there11:23
tntyeah, I mean image you feed INPUT_CLK(clk1) to one SB_IO and INPUT_CLK(clk2) to the other SB_IO.  But then you have the pin_type set to unregistered input for the first one, it will use clk2 automatically and ignore the ck1 connection.11:24
tnt(IIRC .. I wrote that a long time ago)11:25
cr1901ahhh neat11:25
cr1901tnt: Thanks for the explanation, I haven't really looked at ice40 internals. They're... different compared to ECP5/MachXO211:31
tntI'm re-reading that code and I'm wondering if I didn't screw up there ...  I see the part that ignores the conflict if the register isn't needed. But I'm not sure where it picks the "right" net. It might just pick randomly :/11:33
*** futarisIRCcloud <[email protected]> has quit IRC (Quit: Connection closed for inactivity)11:35
tntok, nm what I said above. It won't pick automatically. If it's not used, it needs to either match or be non-connected.11:35
mntmn_florent_: i'm trying to understand the usb_ohci host. if i understand correctly the actual OHCI impl is included as verilog from something generated with spinalHDL? (spinal.lib.com.usb.ohci.UsbOhciWishbone)12:00
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Ping timeout: 252 seconds)12:09
mntmnis there an example for using Wishbone2AXILite and friends to integrate an AXI4Lite peripheral in linux-on-litex-vexriscv?12:58
mntmnhmm there's also add_adapter in soc.py 13:18
mntmnok, this seems to work: usb_wb = self.bus.add_adapter("usb_axi_wb", usb_axi)13:35
mntmnbut how do i set the address for the converted axi->wb peripheral?13:36
*** FabM <[email protected]> has joined #litex13:45
mntmnis there a multi-bit version of SDRTristate?14:07
mntmni mean, i have a 8 bit bidi bus with 1 dir bit14:07
mntmnah, migen Instance("Tristate") can do this14:11
mntmni'm trying to connect an Instance()'s axi4lite signals directly to an AXILiteInterface's axi.aw.*, w.*, r.* and so on signals... this fails in synthesis because there are registers missing in between, i think14:30
mntmnthe axi signals on the Instance() are all wires14:31
mntmni'm getting a bunch of errors like > procedural assignment to a non-register main_r_payload_data is not permitted14:31
mntmnok, possibly i had to specify "s2m" instead of "m2s" for the adapter14:47
mntmnnow i get > module 'Tristate' not found14:47
mntmnok, solved this too14:49
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Quit: Leaving)14:54
*** mc6808 <[email protected]> has quit IRC (Quit: Client closed)17:40
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)19:19
*** TMM_ <[email protected]> has joined #litex19:19
_florent_mntmn: Sorry I was away, good if you managed to do what you wanted20:00
mntmn_florent_: no problem! i came quite far. currently my problem is that the AXI4Lite interface of the core_usb_host wants to be the same 60mhz input clock coming in from the ULPI PHY, but my sys clk is 100MHz. i'm not sure if i have to do anything special to allow this clock crossing (i.e. 100mhz wishbone <-> 60mhz axi4lite)20:03
mntmn_florent_: when i was supplying the core_usb_host with the sysclk, i was able to talk to it (via wishbone->axi4lite). now i connected the ulpi clock instead and it doesn't reply i think (all 0xff). it could also be that the ULPI clock is not running. i would need litescope or some counter to check this, i guess.20:05
mntmn_florent_: in case you're curious, this is how my target looks like atm https://gist.github.com/mntmn/44c3396eb4935e36d91eac41e7bd02bf20:10
_florent_mntmn: You could probably use the AXILiteClockDomainCrossing for this20:36
_florent_https://github.com/enjoy-digital/litex/blob/master/litex/soc/interconnect/axi.py#L107520:36
mntmn_florent_: i see20:36
_florent_the slave would be the bus connected to the usb core (running at 60MHz) and master the bus that will be connected to the SoC20:36
mntmn_florent_: the master is wishbone in this case though, or created by add_adapter?20:38
_florent_BTW, you can directly add an AXILite peripheral with add_slave20:38
_florent_LiteX will automatically insert the adapter if required20:38
mntmnoh!20:39
_florent_(ie converting to Wishbone for a SoC with a Wishbone bus)20:39
_florent_it can also automatically adapt the data-width20:39
mntmnbut how would i insert the AXILiteClockDomainCrossing in this case?20:39
mntmni mean because AXILiteClockDomainCrossing does not wrap a slave, but wants master and slave as arguments... it looks to me like they should not already be connected20:40
_florent_Something like this:20:44
_florent_https://www.irccloud.com/pastebin/kugsdJRV/20:45
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)20:45
_florent_then just use usb_axi_usb as you were doing with usb_axi20:45
mntmn_florent_: ohh, i see. thanks a lot20:45
_florent_and just remove the usb_wb20:45
mntmnyep20:47
nickoeHello guys and girls, it has been a long time I played around with litex now. Any news or changes I shoudl be awere of if I syncanew?20:57
_florent_Hi nickoe, you can find the list of the important changes here: https://github.com/enjoy-digital/litex/blob/master/CHANGES21:01
_florent_otherwise, a recent change is the switch to picolibc, you can look at https://github.com/enjoy-digital/litex/issues/1045 if issues related to this21:02
nickoeOk, thank you.21:12
* nickoe also needs to check if I am involved in any open issues21:12
nickoe_florent_: I remember I had in endianness issue with litex sim and som sdram, did you solve that somehow?21:21
nickoemm, I can't find it in my notes.. I guess I may stuble on it later if it is still a thing21:31
nickoeohh, I found it, it was on th elitedram repo https://github.com/enjoy-digital/litedram/issues/25121:33
nickoe_florent_: Is there something I can do to rectivy this mismatch?21:33
nickoe*rectify21:33
*** toshywoshy <toshywoshy!~toshywosh@ptr-377wf33o3bnthuddmycb.18120a2.ip6.access.telenet.be> has joined #litex21:43
nickoeLiteX support for programming the flash via JTAG?21:46
nickoeReading XAPP586 it appears that ISE/IMPACT flashes a custom bitstream to the FPGA to route through the SPI mode from the JTAG to sprogram it?21:46
nickoeIt does appear as if lxterm did support programming the flash, but it was removed in this commit: https://github.com/enjoy-digital/litex/commit/41964f945cee71337e8e0998d597086b2ef94f77 How does one go about to program the flash now?21:46
nickoeDoes the netv2 support it? https://github.com/enjoy-digital/netv2/blob/14905f90ffdefadc396f2a1df8675d59ee151516/netv2.py#L227-L22921:46
nickoeI am slightly confused by this.21:46
nickoeOther references: https://marc.info/?l=openocd-development&m=151002052505567&w=221:46
tpbTitle: 'Re: [OpenOCD-devel] artix-7 + spi flash programming' - MARC (at marc.info)21:46
ilia__ssure litex does support flashing spi memories through jtag in various ways, depends on the fpga vendor and accordingly available programmers22:04
*** mc6808 <[email protected]> has joined #litex22:05
ilia__sthis is for instance how it is handled through vivado: https://github.com/enjoy-digital/litex/blob/master/litex/build/xilinx/programmer.py#L15722:06
ilia__shere - through openfpgaloader: https://github.com/enjoy-digital/litex/blob/master/litex/build/openfpgaloader.py#L2822:06
ilia__setc22:06

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